You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to decode a mail object which uses Content-Transfer-Encoding: QUOTED-PRINTABLE and I am not able to get the EmailConverter.mimeMessageToEmailBuilder to convert the file due to the below exception
Caused by: java.lang.IllegalArgumentException: unknown content transfer encoder: QUOTED-PRINTABLE
at org.simplejavamail.api.email.ContentTransferEncoding.lambda$byEncoder$1(ContentTransferEncoding.java:52)
at java.base/java.util.Optional.orElseThrow(Unknown Source)
at org.simplejavamail.api.email.ContentTransferEncoding.byEncoder(ContentTransferEncoding.java:52)
at org.simplejavamail.converter.EmailConverter.buildEmailFromMimeMessage(EmailConverter.java:667)
at org.simplejavamail.converter.EmailConverter.mimeMessageToEmailBuilder(EmailConverter.java:136)
at org.simplejavamail.converter.EmailConverter.mimeMessageToEmailBuilder(EmailConverter.java:122)
at org.simplejavamail.converter.EmailConverter.mimeMessageToEmailBuilder(EmailConverter.java:114)
at com.forwarding.backend.helpers.EmailParsingHelper.getEmail(EmailParsingHelper.java:179)
I've tried using the builder to define the content encoding
Yes, the .withContentTransferEncoding your are calling is on the resulting email builder, which will take effect when the email from that builder is converted to a MimeMessage (either by manual conversion or by sending it). So that won't help you for reading an email with transfer encoding.
Having said that, even though the literal value "QUOTED-PRINTABLE" is not RFC compliant as far as I know, I think with a minor tweak to the code, Simple Java Mail can support this. I'll have a look.
bbottema
changed the title
Unknown content transfer encoder: QUOTED-PRINTABLE
Enhancement: make Content-Transfer encoder detection more lenient, supporting more values from the wild
Mar 30, 2023
I'm trying to decode a mail object which uses
Content-Transfer-Encoding: QUOTED-PRINTABLE
and I am not able to get theEmailConverter.mimeMessageToEmailBuilder
to convert the file due to the below exceptionI've tried using the builder to define the content encoding
But this does not seem to override the above or ignore unknown content sources. Can this be added a feature if not available?
The text was updated successfully, but these errors were encountered: