summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2019-04-27 20:33:53 -0700
committerfguillot <fred@kanboard.net>2019-04-27 21:06:20 -0700
commitd6ffe08aebff4a29cfea865cdea647d3d2e83ef1 (patch)
tree3caad3eb5fcd5c536f15a75f0c3622d01b21bd88 /app
parenta9c79fbc4350accc5745d0389f07a09245fa0ad0 (diff)
Add Auto-Submitted E-mail header as per RFC 8384
Diffstat (limited to 'app')
-rw-r--r--app/Core/Mail/Transport/Mail.php5
1 files changed, 5 insertions, 0 deletions
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);
}