Skip to content

Update mail gem to v2.8.1

Stan Hu requested to merge sh-update-mail-gem-15-10 into 15-10-stable-ee

What does this MR do and why?

This backports the upgrade of the mail gem in v2.8.1 to !115755 (merged) to the 15-10-stable-ee branch.

  1. This merge request fixes mail sending when TLS is disabled. In Ruby 3.0.5, net-smtp v0.2.1 enabled TLS by default. However, mail v2.7.1 didn't explicitly disable TLS (, so TLS is always enabled with Ruby 3. mail v2.8.1 has since fixed this issue via

  2. This merge request also removes one monkey patch introduced in !24153 (diffs) since was merged for mail v2.8.0.

  3. In addition, we can drop the mail interceptor validator. This is no longer needed in mail 2.8.1 since has solved the security issue by passing the arguments to Sendmail as an array instead of a string.

  4. Ignore net-protocol warnings for Ruby 2.7.7. Since the mail gem now requires net-imap, which needs net-protocol, there's no use in adding an exception in Gemfile. We now ignore the warnings in Ruby 2.7.

Relates to:

  1. #399241 (closed)
  2. #396252 (closed)


MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch. (see !115755 (merged))
  • The original MR has been deployed to (not applicable for documentation or spec changes).
  • This MR has a severity label assigned (if applicable).
  • Ensure the e2e:package-and-test job has either succeeded or been approved by a Software Engineer in Test. (see !116173 (comment 1334113973))

Note to the merge request author and maintainer

The process of backporting bug fixes into stable branches is tracked as part of an internal pilot. If you have questions about this process, please:

Edited by Ash McKenzie

Merge request reports