1
votes

I've found Mail Integration in the Spring Docs, a mail channel example with XML configuration, a suggestion to use Jasypt to encrypt the userid/password in the XML config, and an XML-based config in the Spring Boot Samples repo, but I have not figured out how to securely configure and use an email channel in a Spring Boot web app that is using annotations.

I looked for ways to incorporate XML bean definitions, and how to convert XML to annotations, but came up empty.

How should I configure mail channels for sending and receiving email in a Spring Boot app?

Thanks!

1
Ideally, I'd like to only have annotation based configuration, so I was hoping someone provide an annotation-based answer but after waiting month, I suppose I must accept the XML-config option.Tim

1 Answers

2
votes

The spring boot integration starter doesn't include mail support; you simply need to add the spring-integration-mail artifact to your pom; you can then configure the mail channel adapters in XML as needed.

You can use @ImportResource to combine XML configuration with a @Configuration class.