October 2018
Intermediate to advanced
590 pages
15h 5m
English
Now, let's implement the sending email feature using JavaMail. We will also use FreeMarker as the template engine to create the body of the email message.
First of all, let's add the following dependencies to pom.xml:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId></dependency>...<dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId></dependency>
The spring-boot-starter-mail starter provides interfaces, such as JavaMailSender, to make the implementation of sending email relatively easy, as you will see in this section. With the presence of the FreeMaker library, Spring Boot will automatically create an instance of freemarker.template.Configuration ...
Read now
Unlock full access