From 8112aca9e800d612f7cdbc12491aa0c38725465f Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 17 Nov 2014 14:43:46 +0100 Subject: [PATCH] Add documentation for email integration Closes gh-1904 --- .../asciidoc/appendix-application-properties.adoc | 8 ++++++++ .../src/main/asciidoc/spring-boot-features.adoc | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 3e1bbbae77..60153b8ba8 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -313,6 +313,14 @@ content into your application; rather pick only the properties that you need. spring.jms.jndi-name= # JNDI location of a JMS ConnectionFactory spring.jms.pub-sub-domain= # false for queue (default), true for topic + # Email ({sc-spring-boot-autoconfigure}/mail/MailProperties.{sc-ext}[MailProperties]) + spring.mail.host=smtp.acme.org # mail server host + spring.mail.port= # mail server port + spring.mail.username= + spring.mail.password= + spring.mail.default-encoding=UTF-8 # encoding to use for MimeMessages + spring.mail.properties.*= # properties to set on the JavaMail session + # SPRING BATCH ({sc-spring-boot-autoconfigure}/batch/BatchDatabaseInitializer.{sc-ext}[BatchDatabaseInitializer]) spring.batch.job.names=job1,job2 spring.batch.job.enabled=true diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 3449d90ee9..fe3a49645a 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2025,6 +2025,19 @@ The following component creates a listener endpoint on the `someQueue` destinati Check {spring-javadoc}/jms/annotation/EnableJms.{dc-ext}[the javadoc of `@EnableJms`] for more details. +[[boot-features-mail]] +== Mail integration +The Spring Framework provides an easy abstraction for sending email using the `JavaMailSender` +interface and Spring Boot provides auto-configuration for it as well as a starter module. + +TIP: Check the {spring-reference}/#mail[reference documentation] for a detailed explanation +of how you can use `JavaMailSender`. + +If `spring.mail.host` and the relevant libraries (as defined by `spring-boot-starter-mail`) +are available, a default `JavaMailSender` is created if none exists. The sender can be +further customized by configuration items from the `spring.mail` namespace, see the +{sc-spring-boot-autoconfigure}/mail/MailProperties.{sc-ext}[`MailProperties`] for more details. + [[boot-features-jta]] == Distributed Transactions with JTA Spring Boot supports distributed JTA transactions across multiple XA resources using