use springboot-mail starter when I use mvn springboot:run everything works fine when I use java -jar app.jar send mail failed I tried lot of thing, the issue come from the MimeTypeRegistryProvider is not found. this class come from module in org.eclipse.angus.activation.MimeTypeRegistryProviderImpl So finaly I use native classes from javax.mail

Caused by: java.lang.RuntimeException: Provider for jakarta.activation.spi.MimeTypeRegistryProvider cannot be found
    at jakarta.activation.FactoryFinder.find(FactoryFinder.java:95) ~[jakarta.activation-api-2.1.2.jar!/:na]
    at jakarta.activation.MimetypesFileTypeMap.getImplementation(MimetypesFileTypeMap.java:397) ~[jakarta.activation-api-2.1.2.jar!/:na]
    at jakarta.activation.MimetypesFileTypeMap.loadFile(MimetypesFileTypeMap.java:270) ~[jakarta.activation-api-2.1.2.jar!/:na]
    at jakarta.activation.MimetypesFileTypeMap.<init>(MimetypesFileTypeMap.java:107) ~[jakarta.activation-api-2.1.2.jar!/:na]
    at jakarta.activation.MimetypesFileTypeMap.<init>(MimetypesFileTypeMap.java:312) ~[jakarta.activation-api-2.1.2.jar!/:na]
    at org.springframework.mail.javamail.ConfigurableMimeFileTypeMap.createFileTypeMap(ConfigurableMimeFileTypeMap.java:150) ~[spring-context-support-6.0.14.jar!/:6.0.14]
    at org.springframework.mail.javamail.ConfigurableMimeFileTypeMap.getFileTypeMap(ConfigurableMimeFileTypeMap.java:123) ~[spring-context-support-6.0.14.jar!/:6.0.14]
    at org.springframework.mail.javamail.ConfigurableMimeFileTypeMap.afterPropertiesSet(ConfigurableMimeFileTypeMap.java:110) ~[spring-context-support-6.0.14.jar!/:6.0.14]
    at org.springframework.mail.javamail.JavaMailSenderImpl.<init>(JavaMailSenderImpl.java:115) ~[spring-context-support-6.0.14.jar!/:6.0.14]
    at com.hhdev.archway.services.ArchMailService.getJavaMailSender(ArchMailService.java:28) ~[classes!/:1.0.0-SNAPSHOT]

Comment From: philwebb

I'm having trouble replicating the issue. A simple project that calls new JavaMailSenderImpl() doesn't appear to fail. @hhfrancois could you please provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem?

Comment From: hhfrancois

I guess not easy to reproduce, sorry for that. I spend all my afternoon on it. I will try to do that tomorrow. Thank for the quick answer Maybe with the pom it will be enough.

Comment From: hhfrancois

@philwebb Not success to reproduce the issues in a simple project. Sorry, I will re try later maybe.

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.