How to debug emails in Drupal 7

Sometimes, working with Drupal, reaching debug of emails that sending project. But how to do it locally? Not all server stacks (such as OpenServer and Acquia Dev Desktop) provide real mail server (as is the case with Acquia Dev Desktop and XMail) and not all packages can put mail into the folder as plain text files (as is the case with OpenServer).

How to fold a letter sent by Drupal in a folder as a text file? Quite simply, Devel module will help us.

  1. Download and install Devel module. It's important to enable it before changing anything.
  2. Edit sites/default/setting.php file
    $conf['mail_system']['default-system'] = 'DevelMailLog';
    $conf['devel_debug_mail_directory'] = '/home/alex/emails/projectname'; 
  3. Pforit! Now all emails placing into folder as text files.
English