Adding option to set Auto-Submitted email header
Related to issue #16538 and PR #27200
As previously discussed an proposed in the issue and PR, this PR add the option Auto-Submitted, which has the main purpose of stopping properly configured mail server from sending OOO-Auto-Replys in response to fully automatic Nextcloud notifications. However as @nickvergessen mentioned in https://github.com/nextcloud/server/issues/27200#issuecomment-908904913 it might not be ideal to hard code the header for any email sent by Nextcloud, for this reason I added the method setAutoSubmitted(string $value) to OC\Mail\Message, which allows apps to dynamically set this header if it is deemed appropriate. The current default is to not set the Header which is equivalent to Auto-Submitted: no. The set of valid values is available with OCP\Mail\AutoSubmittedValue.
Additionally I set this Auto-Submitted value for new user welcome mail (NewUserMailHelper in apps/settings) and CalDAV notifications (OCA\DAV\CalDAV\Reminder\NotificationProvider in apps/dav)
The image show the header being adding to the new user mail, but not the test mail. I was not able to trigger a DAV notification in my 5min test installation until now, but as the code is the same I expect similar results.

Unit tests for the new methods are added as well.
which of the autoloader changes are ones that need to stay? If any, probably only lib/composer/composer/autoload_static.php and lib/composer/composer/autoload_classmap.php right? I would that completly revert commit 77569ba and just commit that changes to these two files again. However, all the other changes came from running build/autoloaderchecker.sh as well and I committed the result of that like documented. Sorry if I missunderstood that.
which of the autoloader changes are ones that need to stay?
bash build/autoloaderchecker.sh
git add lib/composer/composer/autoload_*
and then commit it.
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
Good stuff @bennet0496
thank you @nickvergessen
it's always cool if I can help and contribute, even with the limited amount of coding I usually do :smile:
hello @bennet0496 Thank you so much for your work on this pull request! This ticket seems to have the tag 'pending documentation'. Is there any chance you could clarify what documentation is missing? Is this for admins or for app developers?
Short docs were added in https://github.com/nextcloud/server/issues/34692#issuecomment-1375350845
All our emailing has no docs. Should be added some time to the developer docs in https://docs.nextcloud.com//server/stable/developer_manual/digging_deeper/index.html