CRM-11375 CIVICRM_MAILER_SPOOL has probably never worked for any type of outbound email except bulk mailings

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.6
    • Fix Version/s: 4.3.0
    • Component/s: CiviMail
    • Labels:
      None

      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

            Activity

            [CRM-11375] CIVICRM_MAILER_SPOOL has probably never worked for any type of outbound email except bulk mailings
            Dave D added a comment -

            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.)

            Donald A. Lobo added a comment - - edited

            am looking at this, can we make the job_id optional, in which case other email processes can also use this easily. Seems like creating a job for every email that is being spooled (and not sent via civimail) is overkill (and will also fill the job table real quickly)

            Dave D added a comment -

            In a sense, job_id is optional, since it will now create a dummy job if using this outbound mail setting. If you mean a more general change then I need to say "out-of-scope".

            Donald A. Lobo added a comment -

            dd:

            wanna do a quick chat on this on IRC

              People

              • Assignee:
                Donald A. Lobo
                Reporter:
                Dave D

                Dates

                • Created:
                  Updated:
                  Resolved: