From d6ffe08aebff4a29cfea865cdea647d3d2e83ef1 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 27 Apr 2019 20:33:53 -0700 Subject: Add Auto-Submitted E-mail header as per RFC 8384 --- app/Core/Mail/Transport/Mail.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app') diff --git a/app/Core/Mail/Transport/Mail.php b/app/Core/Mail/Transport/Mail.php index 0d819f77..0fc278d1 100644 --- a/app/Core/Mail/Transport/Mail.php +++ b/app/Core/Mail/Transport/Mail.php @@ -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); } -- cgit v1.2.3