Added an option to send a copy of all generated e-mails to a BCC address

This commit is contained in:
Harry Kakoulidis
2020-12-08 05:49:41 +02:00
committed by GitHub
parent 4d1205a0fe
commit ac224fa178
3 changed files with 8 additions and 0 deletions

View File

@@ -36,6 +36,10 @@ class Mail extends Base implements ClientInterface
->setFrom($this->helper->mail->getMailSenderAddress(), $authorName)
->setTo(array($recipientEmail => $recipientName));
if (! empty(MAIL_BCC)) {
$message->setBcc(MAIL_BCC);
}
$headers = $message->getHeaders();
// See https://tools.ietf.org/html/rfc3834#section-5