This post will walk you through the steps of creating a Contact Form Example with Spring Boot, FreeMarker and Amazon SES.
What you'll build
What you'll need
- JDK 1.7+
- Maven 3+
- Amazon SES account
- SMTP Credentials of your Amazon SES account
- Verified From email and To email on SES console
Stack
- Java, Java Mail API
- Spring Boot
- FreeMarker
- HTML, CSS
Project structure
├── src
│ └── main
│ ├── java
│ │ └── com
│ │ └── hellokoding
│ │ └── form
│ │ ├── model
│ │ │ ├── MailProperties.java
│ │ │ └── User.java
│ │ ├── service
│ │ │ ├── SESService.java
│ │ │ └── SendingMailService.java
│ │ ├── web
│ │ │ └── FormController.java
│ │ └── WebApplication.java
│ └── resources
│ ├── static
│ │ ├── css
│ │ │ └── main.css
│ │ └── js
│ │ └── main.js
│ ├── templates
│ │ └── form.ftl
│ └── application.properties
└── pom.xml
Project dependencies
Data transfer object
Service
Controller
View template
Application Configuration
Run the application
mvn clean spring-boot:run
Source code
[email protected]:hellokoding/form-contact-java-springboot-freemarker-awsses.git
https://github.com/hellokoding/form-contact-java-springboot-freemarker-awsses