Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-Submitted and Precedence headers in automatically sent e-mails #16538

Open
slater0013 opened this issue Jul 25, 2019 · 7 comments
Open

Auto-Submitted and Precedence headers in automatically sent e-mails #16538

slater0013 opened this issue Jul 25, 2019 · 7 comments

Comments

@slater0013
Copy link

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.

Thank you,
GS.

@slater0013 slater0013 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jul 25, 2019
@kesselb
Copy link
Contributor

kesselb commented Jul 25, 2019

Sounds good 👍

Here is the related RFC: https://tools.ietf.org/html/rfc3834 and https://tools.ietf.org/html/rfc5436

@szaimen

This comment has been minimized.

@slater0013

This comment has been minimized.

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of feature: emails and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels May 27, 2021
@slater0013
Copy link
Author

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
Copy link
Contributor

szaimen commented May 28, 2021

Thanks @slater0013! Would you be able to create a PR for this? That would be really great! :)

@slater0013
Copy link
Author

Ok I ... tried something :)
#27200

@szaimen
Copy link
Contributor

szaimen commented May 28, 2021

Great, thank you! :)

@szaimen szaimen added 2. developing Work in progress and removed 1. to develop Accepted and waiting to be taken care of labels May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants