What solutions are people using to track all outbound email from CiviCRM?

BCCing would be one option - a BCC could be added to all outbound email via an extension, I suppose.

Else I'm guessing that some Third Party ESPs might also provide this functionality.

Interested to know what people are doing / if there are any solutions I haven't thought of.

  • 1
    Not really an answer (I think) but we're using a third party ESP that logs all outgoing emails. Jan 15, 2020 at 13:22
  • My question to the client would be whether it's sufficient to keep a smaller sample of the emails. Eg if the concern is with delivery to a given email provider(s), creating an account on that/those provider(s) and subscribing the address(es) would give you a confirmation of delivery without the privacy, performance and other implications. Jan 15, 2020 at 17:18

7 Answers 7


You could look at the Transactional Mail extension which ensures everything going out from eg Sch Reminders, Receipts etc are stored as Activities on the contact

  • 1
    Lots of great answers to think about and reflect on. In the end, I think this is the one that best meets the client needs :) Jan 23, 2020 at 8:39
  • good to know it is of use
    – petednz - fuzion
    Jan 23, 2020 at 22:45

In civicrm.settings.php there's some settings to log it all to a file. See https://docs.civicrm.org/dev/en/latest/tools/debugging/#changing-file-based-settings

define('CIVICRM_MAIL_LOG', '/file/path');
  • 2
    Thats gonna get pretty huge if your sending a lot of emails. Our approach is to use the sending gateways logging/audit processes. Although they do not normally keep for more than 14 days or so, some do. I guess the real question is what are objectives of keeping the logs? Jan 15, 2020 at 13:48
  • thanks @Demerit - I didn't know about CIVICRM_MAIL_LOG_AND_SEND. Jan 15, 2020 at 16:35
  • @ParvezSaleh - good question. The client had a bad experience sending mail from civicrm in the past and wants to keep an eye on what is being sent. Hence needs to be client user friendly. Jan 15, 2020 at 16:38
  • Was the bad experience with the design/look and feel of the emails or the deliverability? Jan 16, 2020 at 20:14
  • Good question. Not 100%. My hunch was deliverability and just not being sure of what was getting sent, what each email contained, etc. Jan 22, 2020 at 15:40

From an admin (non-sysadmin) perspective, the extension invoicehelper has options to automatically cc/bcc specific emails, notably for offline membership/contribution emails.

It does not handle the simple "Send Email" form, however. And one thing I get asked often, is that when viewing emails sent (activities), it should display who was CC'ed/BCC'ed. For example, if a membership invoice was sent to an organization and CC a specific contact, it's an important bit of information for tracking down late payments.


If it's your current MTA, Postfix has an option to BCC all emails to an address: always_bcc

More complex solutions can be implemented.

  • 1
    Any debug methods which use SMTP may have impact on your civimail, eg if you debug by sending many emails to a single mailbox at a given mail provider, this might affect your spam reputation with them. Jan 15, 2020 at 17:15

I often use 3rd party mailing services (namely mailgun, mandrill but have used others too). You can pay these services a lot to keep all your mail for a while, but the sheer amount of it will always be an issue if you're looking to capture every single mail that goes out.

I have implemented an exim4 configuration that keeps a copy in a local Maildir at times when I've been paranoid and wanted to see exactly what goes out (e.g. check placeholder replacements). This has benefits in that it's on your own server so you can easily do what you want with it: search it, delete it, compress it (or store it on a compressed filesystem, e.g. btrfs offers this option), access it using MUAs or webmail (if you configure it right), store it somewhere affordable - e.g. (Bytemark give you 100GB storage for £2/mo and their cheapest VM is £6/mo).


With a bit of development you could probably put something together using https://lab.civicrm.org/extensions/mailreader as the UI


Another option if it needs to be accessible to staffers is an extension that instead of auto-adding a bcc to all emails, logs them as an activity of some new type. Then either in the same extension or via something like https://github.com/JMAConsulting/biz.jmaconsulting.activitytypeacl, restrict viewing those activities to admins. It might have similar performance issues as file logging on a busy site.

  • 1
    I'd note that CiviCRM gets difficult if you have a lot of activities (I once had a 40GB activitty table!). You can claw back some performance by using InnoDB's COMPRESS ROW_FORMAT since this sort of thing compresses well (a lot of repetition) Jan 16, 2020 at 9:42

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.