Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 1.3 KB

File metadata and controls

26 lines (17 loc) · 1.3 KB

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