Enterprise UX
Join our upcoming webinar about enterprise UX! September 28, 2022.

Sending Email from Java Applications

Alejandro Duarte
Alejandro Duarte
On Feb 22, 2016 1:00:00 PM

Sending email is a common feature required in many business applications. From simple notifications containing plain text to complex reports with links and multiple attachments, email is a common way of asynchronous communication with end users.

This tutorial shows how to send email messages in two different ways:

  1. Using the Apache Commons Email library which offers a simplified API on top of the JavaMail API.

  2. Using Spring Mail Support, a utility library that encapsulates the specifics of the mailing system, also implemented on top of the JavaMail API.

Although email operations include sending, receiving, deleting, setting flags, and others depending on the specific email server in use, this tutorial only discusses email sending through SMTP.

Read the complete tutorial here

Alejandro Duarte
Alejandro Duarte
Software Engineer and Developer Advocate at MariaDB Corporation. Author of Practical Vaadin (Apress), Data-Centric Applications with Vaadin 8 (Packt), and Vaadin 7 UI Design by Example (Packt). Passionate about software development with Java and open-source technologies. Contact him on Twitter @alejandro_du or through his personal blog at www.programmingbrain.com.
Other posts by Alejandro Duarte