Skip to content

unknown content transfer encoder: 8bit #485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RevoutIT opened this issue Dec 11, 2023 · 7 comments
Closed

unknown content transfer encoder: 8bit #485

RevoutIT opened this issue Dec 11, 2023 · 7 comments
Labels

Comments

@RevoutIT
Copy link

Hello, if an email has content transfer encoding: 8bit, an exception is thrown at EmailConverter.mimeMessageToEmail(mimeMessage): unknown content transfer encoder: 8bit. Can this please be changed so that encoder is ignored in this case?

https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/aa563055(v=exchg.140)

Thank you!

@bbottema
Copy link
Owner

Do you have an example message I can work with?

@RevoutIT
Copy link
Author

Hello, here is the email that caused the problem.
test8Bit..zip

@bbottema
Copy link
Owner

bbottema commented Dec 12, 2023

Which version are you on? I'm having no issues with 8.x.x.

image

@RevoutIT
Copy link
Author

8.3.2

@bbottema
Copy link
Owner

I'm not able to reproduce the problem with 8.3.2 and your example message, unfortunately. Do you have a stack trace?

@RevoutIT
Copy link
Author

java.lang.IllegalArgumentException: unknown content transfer encoder: 8bit
at org.simplejavamail.api.email.ContentTransferEncoding.lambda$byEncoder$1(ContentTransferEncoding.java:55)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.simplejavamail.api.email.ContentTransferEncoding.byEncoder(ContentTransferEncoding.java:55)
at org.simplejavamail.converter.EmailConverter.buildEmailFromMimeMessage(EmailConverter.java:673)
at org.simplejavamail.converter.EmailConverter.mimeMessageToEmailBuilder(EmailConverter.java:139)
at org.simplejavamail.converter.EmailConverter.mimeMessageToEmailBuilder(EmailConverter.java:125)
at org.simplejavamail.converter.EmailConverter.mimeMessageToEmail(EmailConverter.java:101)
at org.simplejavamail.converter.EmailConverter.mimeMessageToEmail(EmailConverter.java:93)

@bbottema
Copy link
Owner

I have no idea how that would even be possible. At any rate, I can't reproduce it with 8.3.2, and I've expanded the junit tests to test this particular case, which also builds fine in the pipeline. I'm not sure what else I can do here.

No clue what's going on in your case. Maybe something related to reflection code on your end? Or a server fooling around with class loaders? Surprising indeed. I don't see any other way than to close this as user error, even if the cause is unknown. I'll happily reopen if you come up with more data (perhaps you're able to debug into the class and see what is happening).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants