Skip to content

Stop logging email information when emails are disabled

Marc requested to merge marcshaw/gitlab-ce:44790-disabled-emails-logging into master

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?

What are the relevant issue numbers?

Closes #44790 (closed)

Edited by Marc

Merge request reports