Add Auto-Submitted E-mail header as per RFC 8384
This commit is contained in:
parent
a9c79fbc43
commit
d6ffe08aeb
|
|
@ -36,6 +36,11 @@ class Mail extends Base implements ClientInterface
|
|||
->setFrom($this->helper->mail->getMailSenderAddress(), $authorName)
|
||||
->setTo(array($recipientEmail => $recipientName));
|
||||
|
||||
$headers = $message->getHeaders();
|
||||
|
||||
// See https://tools.ietf.org/html/rfc3834#section-5
|
||||
$headers->addTextHeader('Auto-Submitted', 'auto-generated');
|
||||
|
||||
if (! empty($authorEmail)) {
|
||||
$message->setReplyTo($authorEmail);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue