You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto-Submitted and Precedence headers in automatically sent e-mails #16538
Is your feature request related to a problem? Please describe.
Emails are often automatically sent by Nextcloud. eg : activity or sharing notifications. People with auto-reply configured on their mailboxes reply...
Describe the solution you'd like
Two additionnal headers can be added in automatically submited emails, as described in RFC.
Auto-Submitted and Precedence. RFC-compliant mail clients may not autoreply when those headers are present.
Activity
kesselb commentedon Jul 25, 2019
Sounds good 👍
Here is the related RFC: https://tools.ietf.org/html/rfc3834 and https://tools.ietf.org/html/rfc5436
szaimen commentedon May 26, 2021
slater0013 commentedon May 27, 2021
slater0013 commentedon May 27, 2021
AFAIUnderstand....
Based on https://swiftmailer.symfony.com/docs/headers.html#text-headers
File lib/private/Mail/Mailer.php around line 191:
$headers = $message->getSwiftMessage()->getHeaders();
$headers->addTextHeader('Auto-Submitted', 'auto-generated');
And... That's it ! Or implementing the getHeaders() function in lib/private/Mail/Message.php
Tested in my Nextcloud test instance, works like a charm ! Auto-Submitted header is added to the sent mails (Test e-mail from Admin pannel)
GS.
szaimen commentedon May 28, 2021
Thanks @slater0013! Would you be able to create a PR for this? That would be really great! :)
slater0013 commentedon May 28, 2021
Ok I ... tried something :)
#27200
szaimen commentedon May 28, 2021
Great, thank you! :)