Details
Description
I think the intention behind this constant you can set in civicrm.settings.php was to have all bulk mailings be logged into civicrm_mailing_spool and not actually get sent, e.g. for debugging. But it doesn't work for any other type of outbound mail because there is no associated job, and both the table structure and the "sending" function require a valid job id.
It would be useful to have this also work for other emails. There is CIVICRM_MAIL_LOG to write to a file, but the option to write to db is useful too (see also CRM-11190).
Attachments
Issue Links
- supplements
-
CRM-11190 Unit testing sent emails is not straightforward
-
- Done/Fixed
-
Not sure who to assign for QA. To test:
1. Go to outbound mail settings.
2. Choose Redirect to database.
3. Do something that makes an email go out.
4. Go to CiviMail - Archived Mailings. (You sometimes have to reload the page to see the email.)
5. Look at the email. (For the purposes of unit testing or logging, which is why you would use this setting, I wasn't too concerned whether the various fields in the report show up, just that the raw email was logged properly.)