Skip to content

Fix delivery of service desk thank you email with SMTP pool

Heinrich Lee Yu requested to merge fix-smtp-pool-errors into master

What does this MR do?

After enabling SMTP pooling in production, we saw errors like: undefined method 'settings' for #<Mail::SMTPPool:0x00007f2e7bd09228>

https://sentry.gitlab.net/gitlab/gitlabcom/issues/2603245

The service desk thank you email uses #deliver_later! which behaves differently to the regular #deliver_later.

This MR fixes the SMTP pool gem so that it handles #deliver_later! / #deliver!. This also changes the service desk mailer to use #deliver_later instead. Using the bang version of the method ignores the perform_deliveries setting and that is not intended.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Heinrich Lee Yu

Merge request reports

Loading