Staging and development sites typically have real outbound email turned off, and for good reason (see https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+CiviCRM+instance+from+production+to+staging, for example).

CiviCRM-specific ways to do this include the "Redirect to Database" setting (at /admin/setting/smtp?reset=1), and setting define('CIVICRM_MAIL_LOG', ...) in civicrm.settings.php

Unfortunately, it's rather tedious to examine outbound email when testing things like tokens, templates, etc. As a developer I can see them in the log file or database, but that's not much good for user acceptance testing.

Is there an easy way for users to read the outbound CiviCRM email that's been sent to a log file or to the database?

  • Great question - I'd like to know too! Commented Jun 23, 2016 at 19:33

1 Answer 1


Redirect to database puts them as mass mailings, or used to. You can read them in the UI the same as those.

  • 1
    Super! Although it would be better if it provided <pre> formatting for the text version of the email, this is a pretty useful feature as-is.
    – TwoMice
    Commented Jun 23, 2016 at 21:49
  • I think as long as the tags were added at the display layer not part of the message, otherwise it may or may not cause a problem with unit testing for the webtests, which is why the feature was added in the first place. Not sure if web tests are still the same architecture.
    – Demerit
    Commented Jun 23, 2016 at 23:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.