jenkinsci / lib-mock-javamail

JavaMail mock objects
8 stars 8 forks source link

javax.mail.Provider classes for the mocks #1

Closed erikmartino closed 6 years ago

erikmartino commented 6 years ago

Motivation:

They no longer take priority over com.sun stores and transports with Spring Boot 2.0.5

erikmartino commented 6 years ago

I retract it, found a better way.

Maarten-Damen commented 6 years ago

@erikmartino do you mind to share your better way with us? Running into the same issue.

Thanks!

erikmartino commented 6 years ago

Sure @Maarten-Damen

@SpringBootTest(classes = MailTestApplication.class, properties = {
        "spring.mail.host=smtp.example.com",
        "spring.mail.properties.mail.smtp.class=org.jvnet.mock_javamail.MockTransport",
        "spring.mail.properties.mail.pop3.class=org.jvnet.mock_javamail.MockStore",
})
robtimus commented 5 years ago

Can this pull request be reopened and merged? It's great that there is a workaround for Spring Boot, but for other projects it's not that simple.

reda-alaoui commented 4 years ago

@robtimus Please take a look at https://github.com/kohsuke/mock-javamail/pull/3