Stop logging email information when emails are disabled
What does this MR do?
Stops action mailer from logging events, such as Sent mail to ...
, to the rails log, but still logs the contents of the mail to rails logger.
Are there points in the code the reviewer needs to double check?
N/A
Why was this MR needed?
When disabling emails through the configuration (gitlab.yml - email_enabled: false
), this attaches an email interceptor to action mailer which stops the email from being sent. Even though the email does not get sent, action mailer logs Sent mail to user@account.com
which could cause concern for someone looking at the logs.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #44790 (closed)
Edited by Marc