Simple example of sending mail with Spring
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This project tries to provide an example for sending a text/html email using Spring and Java Mail.

One goal is to hide the internals of configuring Java Mail as much as possible from the user.


An integration test that will testing sending emails can be run by activiating the it (integration testing) Maven profile:

$ mvn -Dit verify

The integration test, EmailSenderIntegrationSpec, will use the properties defined in EmailSenderIntegrationSpec-context.xml to send the emails. Update this file first with your desired properties for the email session before running the test.