From 0010eeeaedf4e9417602c008e283dd2d1687fddb Mon Sep 17 00:00:00 2001 From: johnnyshields Date: Mon, 23 Jan 2023 18:13:07 +0900 Subject: [PATCH] Partial revert of PR #1495 ("Preserve message-level charset when adding parts") because it is the same issue as PR #1470 ("Adding a part should not reset the mail's charset to nil") --- lib/mail/message.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/mail/message.rb b/lib/mail/message.rb index e416df429..5c7d40abe 100644 --- a/lib/mail/message.rb +++ b/lib/mail/message.rb @@ -2073,11 +2073,7 @@ def add_multipart_alternate_header def add_boundary unless body.boundary && boundary - unless header['content-type'] - _charset = charset - header['content-type'] = 'multipart/mixed' - header['content-type'].parameters[:charset] = _charset - end + header['content-type'] = 'multipart/mixed' unless header['content-type'] header['content-type'].parameters[:boundary] = ContentTypeField.generate_boundary body.boundary = boundary end