mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #318] UTF-8 Email text is not decoded correctly #209
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @antonionardella on GitHub (Jun 20, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/318
Hello!
The email text is not decoded correctly on the website:


If you can tell me where to look, I can try to fix that.
Best,
Antonio
@axllent commented on GitHub (Jun 20, 2024):
I've seen this before, and I don't think it's a Mailpit issue at all but rather an email encoding issue (not encoding the subject header correctly and not specifying utf8 encoding for the body). Please could you attach a raw copy of an email (including header and body) which has this problem so I can test? Thanks.
@antonionardella commented on GitHub (Jun 20, 2024):
The email itself is then shown correctly and the raw email is here:
As shown
gelöstis written correctly here@axllent commented on GitHub (Jun 20, 2024):
I think it's because of the
charset="iso-8859-1"encoding specified in the content type. This should be utf-8Where does it display correctly?
@antonionardella commented on GitHub (Jun 20, 2024):
The word is displayed correctly within the raw email and in the mail client
@axllent commented on GitHub (Jun 21, 2024):
Ahh yes, I see what is confusing you. The RAW message is displayed using UTF-8 because that is the default in Mailpit, and the raw message contains everything (headers, message parts etc). The issue here is that the email itself specifies that the encoding for the text part is encoded with (and so also should be decoded with)
iso-8859-1which is not correct. The email client is ignoring theiso-8859-1(which it shouldn't be, but I can't comment on that).Just to be clear, Mailpit is displaying the message correctly (doing exactly what it should), the problem here is the message itself.
This fails (what you are getting)....
This however renders the message correctly:
The fix is that sendEmail should be encoding the message part using
charset="UTF-8", notcharset="iso-8859-1".@github-actions[bot] commented on GitHub (Jun 29, 2024):
This issue has been marked as stale because it has been open for 7 days with no activity.
@github-actions[bot] commented on GitHub (Jul 2, 2024):
This issue was closed because there has been no activity since being marked as stale.