-
Notifications
You must be signed in to change notification settings - Fork 16
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
Cannot parse messages without a session #121
Comments
Using an "empty" session appears to work. It doesn't appear to try to connect to anything with the example above. Session session = Session.getInstance(new Properties()); |
For jakarta.mail:jakarta.mail-api:2.1.2 it looks like you are missing the Angus dependencies. There are 4 jars that have to be added: The "java.lang.IllegalStateException: Not provider of jakarta.mail.util.StreamProvider" is usually missing dependencies. If you missing those dependencies in your test case then add them and retest. |
My point there is that in the previous version you did not need those dependencies. |
@OrangeDog Yes I was able to gather that when I dug deeper into the code. My initial understanding was incorrect. Because of that I fixed this. Thank you for reporting this! |
Describe the bug
It used to be the case that you could parse
MimeMessage
s without any session, for an application that doesn't need to send or receive email itself.This ability has been lost at some point in the migration from
com.sun.mail
toorg.eclipse.angus
.To Reproduce
This code works if using
com.sun.mail:mailapi:2.0.1
:If using
org.eclipse.angus:jakarta.mail:2.0.2
it throws:Expected behavior
A session only being necessary if connecting to a server of some kind. Code compatibility with older releases.
Additional information
org.eclipse.angus:jakarta.mail:1.0.0
throws the same exceptionjakarta.mail:jakarta.mail-api:2.1.2
throwsjava.lang.IllegalStateException: Not provider of jakarta.mail.util.StreamProvider was found
[sic]jakarta.mail:jakarta.mail-api:2.0.1
throwsjava.lang.NoClassDefFoundError: com/sun/mail/util/FolderClosedIOException
com.sun.mail:jakarta.mail:2.0.1
works successfullyThe text was updated successfully, but these errors were encountered: