We are moving our outgoing email and I have a request to add a BCC to all outgoing emails from the system for a while. Has anyone ever done something like this? It will be the same email every time.
We are moving our outgoing email and I have a request to add a BCC to all outgoing emails from the system for a while. Has anyone ever done something like this? It will be the same email every time.
If it's only emails that the users send (from the UI) - we can extend the MailApi and create a CustomMailApi in custom/modules/Emails/clients/base/api/CustomMailApi.php. In the handleMail method we can add the BCC in the request args.
If you want to add emails for all outgoing emails (eg: auto replies, system emails, etc) - And since you say it's temporary - a non-upgrade safe approach is to directly modify modules/Emails/Email.php - and add your BCC whenever $mailer->send() is called. But since it's non upgrade safe - you can't do this in Cloud.
If it's only emails that the users send (from the UI) - we can extend the MailApi and create a CustomMailApi in custom/modules/Emails/clients/base/api/CustomMailApi.php. In the handleMail method we can add the BCC in the request args.
If you want to add emails for all outgoing emails (eg: auto replies, system emails, etc) - And since you say it's temporary - a non-upgrade safe approach is to directly modify modules/Emails/Email.php - and add your BCC whenever $mailer->send() is called. But since it's non upgrade safe - you can't do this in Cloud.
I have a feeling thats the only way to do it. I might be able to override the Email.php in the custom directory but I think its hardcoded too many times for that to work right.