-
Notifications
You must be signed in to change notification settings - Fork 937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mail::Body object returned from Mail::Message#body does not inherit message's charset #1410
Comments
I also experienced this issue with ActionMailbox on Rails (see rails/rails#43038) Steps to reproduceGiven the email contents below, I would expect the plain-text portion of the email to be decoded using UTF-8 because of the header, but instead Mail uses ASCII-US. We are using the default configuration for ActionMailbox, which according to the guide should set UTF-8. Email Contents (sent from Gmail)
Expected behaviorMail should report the charset as UTF-8 and decode as such, given the header for the first plain-text body part. Note the charset in the first block here:
Actual behaviorMail uses US-ASCII for the body and UTF-8 for the header. System configurationRails version: |
The same error happened to me this week. It would be nice if this could be fixed. |
Same here ! |
Is there a known workaround? |
What I do is just call the decoded method directly on the mail or part object. |
It seems like the returned Mail::Body instance from Mail::Message#body always uses the default charset
US-ASCII
regardless of theContent-Type
header in the original message.Is this behavior intended? If not, I am ready to write up a patch for this. (I might need some help on testing)
The text was updated successfully, but these errors were encountered: