6

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?

5

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 Jun 23 '16 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 Jun 23 '16 at 23:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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