-
-
Notifications
You must be signed in to change notification settings - Fork 273
Description
The org.simplejavamail.email.internal.EmailPopulatingBuilderImpl#withAttachment()
methods contain call to MiscUtil.encodeText(text)
which encode attachment names. If I want later to query attachments on my Email object, I'll see encoded messages, which are different from what was populated. It's not very convenient, I would expect this encoding to happen at a later stage, just before sending the email, keeping Java model clean and not overriding values I populated it with initially.
When parsing an msg
file it also creates a problem, since resulting Email object won't have original file name at all - I have to decode it manually.
Morever, MimeUtility.encodeText()
and MimeUtility.decodeText()
do not work reliably on all platforms. I couldn't get to the bottom of it, but on my machine MimeUtility.encodeText(text)
produces output which can't be parsed by MimeUtility.decodeText(text)
, although MimeUtility.encodeText(text, "UTF-8", "B")
works well in all cases.