Drupal 7 stop and log email

By Selwyn Polit, 25 August, 2021

When making a copy of a drupal 7 site, I often need to disable outgoing emails.  I found a useful module called maillog that does the job well.  It also logs all emails so you can easily see what the site is sending out.  You can find it at http://drupal.org/project/maillog

After enabling the module, you can configure it at admin/config/development/maillog

You can disable all email by unclicking the checkbox : Allow the e-mails to be sent.

You can view the log at admin/reports/maillog where you get a nice little list and links to delete individual log items.


Please note.  There is not a way to automatically keep the mail log table from growing huge so be aware that you will manually have to purge it.

Here is what the log looks like.