Adding the Auto-Submitted header for notification mails #1041
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In PR nextcloud/server#35876, I added the possibility to directly set the
Auto-Submitted
mail header fromOCP\Mail\Message
. Reasons for the header are described in this PR and in an older issue nextcloud/server#16538 and PR nextcloud/server#27200. But the short of it is that it prevents OOO/vacaction auto-reponses on properly configured mail system, that other wise would go to the configured sender address from the NC instance.This PR adds utilization of the method introduced in nextcloud/server#35876, however there also is a fallback way via
getSwiftMessage()
allowing backwards compatibility for older NC version.