Skip to content

A quick example Spring-boot project on how to send email using Apache velocity and execute test with Greenmail

License

Notifications You must be signed in to change notification settings

As-12/Spring-boot-example-Send-Email-Template

Repository files navigation

Spring Boot Examples

Sending Email with Java using HTML template

An example Spring-boot project using Java Mail, Apache Velocity, and HTML template to generate a beautiful templated email. The project serves as a quick boilerplate to be used in other larger projects. Any contribution is welcome by opening a pull request. The example configures the mailer to send email over Gmail's SMTP protocol. Users will need to authorize "less secure app" on the security setting of their google account.

Sample templated Image

HTML Template

The HTML Template in this example is based from this.

Quick Start

  1. This is a simple maven project you can import directly to your Java IDE of choice.
  2. To run an example,
    • Change mailing recipient in application.properties
    • Update sender credentials over on com.as12.config.EmailConfig
    • Run your application once the properties are configured
    • Navigate to http://localhost:8080/test to send an example email

License

MIT License

About

A quick example Spring-boot project on how to send email using Apache velocity and execute test with Greenmail

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages