Add Auto-Submitted E-mail header as per RFC 8384
This commit is contained in:
committed by
fguillot
parent
a9c79fbc43
commit
d6ffe08aeb
@@ -36,6 +36,11 @@ class Mail extends Base implements ClientInterface
|
|||||||
->setFrom($this->helper->mail->getMailSenderAddress(), $authorName)
|
->setFrom($this->helper->mail->getMailSenderAddress(), $authorName)
|
||||||
->setTo(array($recipientEmail => $recipientName));
|
->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)) {
|
if (! empty($authorEmail)) {
|
||||||
$message->setReplyTo($authorEmail);
|
$message->setReplyTo($authorEmail);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user