mail-api icon indicating copy to clipboard operation
mail-api copied to clipboard

decoding badly encoded strings

Open glassfishrobot opened this issue 8 years ago • 5 comments

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

glassfishrobot avatar Nov 07 '17 14:11 glassfishrobot

  • Issue Imported From: https://github.com/javaee/javamail/issues/293
  • Original Issue Raised By:@M-HT
  • Original Issue Assigned To: Unassigned

glassfishrobot avatar Sep 10 '18 06:09 glassfishrobot

@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.

glassfishrobot avatar Nov 08 '17 02:11 glassfishrobot

@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.

glassfishrobot avatar Nov 08 '17 12:11 glassfishrobot

@sgumirov Commented I can confirm this decoding issue exists, I'm trying to resolve it when using Camel Mail endpoint

glassfishrobot avatar Aug 23 '18 07:08 glassfishrobot

@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.

glassfishrobot avatar Aug 23 '18 20:08 glassfishrobot