Add mail server connection check

If a `JavaMailSenderImpl` is available, check that the underlying mail
server is available on startup. Add a `spring.mail.test-connection`
property to control this behaviour.

Closes gh-3408
This commit is contained in:
Eddú Meléndez
2015-07-02 13:41:17 -05:00
committed by Stephane Nicoll
parent 0eada5df86
commit 6f31080f78
3 changed files with 26 additions and 0 deletions

View File

@@ -519,6 +519,7 @@ content into your application; rather pick only the properties that you need.
spring.mail.default-encoding=UTF-8 # encoding to use for MimeMessages
spring.mail.properties.*= # properties to set on the JavaMail session
spring.mail.jndi-name= # JNDI location of a Mail Session
spring.mail.test-connection= # Enable test connection. Default: false
# SPRING BATCH ({sc-spring-boot-autoconfigure}/batch/BatchProperties.{sc-ext}[BatchProperties])
spring.batch.job.names=job1,job2