mail-api
mail-api copied to clipboard
decoding badly encoded strings
Would it be possible to correctly decode badly encoded strings like the following example ?
Header in received mail:
Subject: =?UTF-8?B?KCBSZXF1ZXN0OkEsMzE4ODEsOTI5MTMgKSBJbmZvcm3D?= =?UTF-8?B?oWNpYSBrIHBvxb5pYWRhdmtlIFVQVlMgxI0uIDkyOTEz?=
It's badly encoded because it splits two byte character - first byte is at the end of the first encoded text and the second byte is at the beginning of the second encoded text.
I gets decoded to:
( Request:A,31881,92913 ) Inform??cia k požiadavke UPVS č. 92913
Instead of:
( Request:A,31881,92913 ) Informácia k požiadavke UPVS č. 92913
- Issue Imported From: https://github.com/javaee/javamail/issues/293
- Original Issue Raised By:@M-HT
- Original Issue Assigned To: Unassigned
@bshannon Commented It's software, many things are possible. :-)
Whose software created such a header? Did you report the bug to them? What did they say?
This would be a significant, difficult, and risky change to JavaMail, which I'm unlikely to consider without much greater motivation.
@M-HT Commented I don't know what software created the header - there's no header identifying the email client. And I didn't contact any of the senders to inquire about it.
@sgumirov Commented I can confirm this decoding issue exists, I'm trying to resolve it when using Camel Mail endpoint
@bshannon Commented Can you determine which mailer created the message with the badly encoded header, e.g., by looking at the X-Mailer or User-Agent headers in the message? It would be much better to report this problem to the owner of the mailer that's creating these incorrectly encoded messages.