X-RESEND sends body in utf-8 (even if charset specifies otherwise)
When sending an email using X-RESEND, if the source email is sent using another charset than UTF-8, the result is still sent as UTF-8, in contradiction with what the headers will say.
The attached patch adds a test which exhibits the issue.
I can make the test pass by doing:
--- a/lib/schleuder/mail/message.rb
+++ b/lib/schleuder/mail/message.rb
@@ -87,6 +87,7 @@ module Mail
else
# We copied the content-headers, so we need to copy the body encoded.
# Otherwise the content might become unlegible.
+ wrapper_part.charset = self.body.encoded.encoding.to_s
wrapper_part.body = self.body.encoded
end
clean.add_part(wrapper_part)
This will specify the appropriate charset in the headers, but I wonder if it's actually the right way to solve the issue.