]> source.dussan.org Git - redmine.git/commitdiff
Update Mail gem to 2.8 (#37993).
authorGo MAEDA <maeda@farend.jp>
Sun, 5 Feb 2023 05:35:56 +0000 (05:35 +0000)
committerGo MAEDA <maeda@farend.jp>
Sun, 5 Feb 2023 05:35:56 +0000 (05:35 +0000)
Patch by Pavel Rosický.

git-svn-id: https://svn.redmine.org/redmine/trunk@22094 e93f8b46-1217-0410-a6f0-8f06a7374b81

Gemfile
app/models/mail_handler.rb

diff --git a/Gemfile b/Gemfile
index 27ea84610efe1cf3b8cbc85ac399f3de711c0a51..1759e72b8bb57261f019c4730ad746be3ab58524 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -9,7 +9,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.1'
 gem 'nokogiri', '~> 1.14.0'
 gem 'i18n', '~> 1.12.0'
 gem "rbpdf", "~> 1.20.0"
index 1025bf033d2d1bba200ffa9a347e2a5e1e61da87..6da848124a7742db37a5032bc624df8afce6f015 100644 (file)
@@ -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)