Don’t log recipients when sending mail #34747
Merged
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.
Since production applications typically run with log level info and email adresses should be considered as sensitive data (or personal data under GDPR) we want to prevent them from ending up in the logs. In development mode (with log level debug) they are still logged as part of the Mail::Message object.
While we could add another config option for this (#19293) I propose we fix the privacy issue by doing the right thing by default, and custom log subscribers could be written to restore the old functionality.
(As a bonus, the wording in the logs is now consistent with the event name ;))