Actions
Patch #37993
closedUpdate Mail gem to 2.8
Description
https://github.com/mikel/mail/blob/2-8-stable/CHANGELOG.rdoc#label-Version+2.8.0+-283-Dec-2022-29
diff --git a/Gemfile b/Gemfile index 79275f83a..c7b9da727 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,7 @@ gem 'mini_mime', '~> 1.1.0' gem "actionpack-xml_parser" gem 'roadie-rails', '~> 3.0.0' gem 'marcel' -gem "mail", "~> 2.7.1" +gem "mail", "~> 2.8.0" gem 'csv', '~> 3.2.0' gem 'nokogiri', '~> 1.13.6' gem "rexml", require: false if Gem.ruby_version >= Gem::Version.new('3.0') diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 8f7cef691..ece770baa 100644 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -523,12 +523,7 @@ class MailHandler < ActionMailer::Base part.attachment? end parts.map do |p| - body_charset = - if Mail::RubyVer.respond_to?(:pick_encoding) - Mail::RubyVer.pick_encoding(p.charset).to_s - else - p.charset - end + body_charset = Mail::Utilities.pick_encoding(p.charset).to_s body = Redmine::CodesetUtil.to_utf8(p.body.decoded, body_charset) # convert html parts to text p.mime_type == 'text/html' ? self.class.html_body_to_text(body) : self.class.plain_text_body_to_text(body)
Related issues
Actions