-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
In what version(s) of Spring Integration are you seeing this issue?
6.0.0 but also 6.0.5
Describe the bug
org.springframework.integration.mail.ImapMailReceiver uses com.sun.mail.imap.IMAPFolder which is a implementation detail of the Jakarta Mail runtime.
When you use Spring integration in combination with Eclipse Angus Mail (which "is the direct successor of JavaMail/JakartaMail") with version 2 or above on the classpath it will not work.
Instead you get errors like:
java.lang.NoClassDefFoundError: com/sun/mail/imap/IMAPFolder
Angus Mail version 2 changes the "package name prefix from com.sun.mail to org.eclipse.angus.mail"
To Reproduce
see above or see example below
Expected behavior
spring integration should
- either do not use any implementation details of the Jakarta Mail Runtime
- or provide a version which is compatible with Eclipse Angus Mail 2 and above (use the new package names)
- or provide a version which is compatible with Eclipse Angus Mail 1 and 2 (use either the old or the new package name, depending on what is available at runtime)
Sample
https://github.com/Brummolix/spring-integration-with-angus2