Chapter 7, Integrating JavaMail and JMS with Spring

Q1. What is a JavaMail API?

A JavaMail API provides a protocol and platform independent framework to provide e-mail support for a Java application. The JavaMail API is a collection of classes and interfaces that comprise an e-mail system. These steps are involved in sending a simple email, using the JavaMail API. They are as follows:

  1. Connect to a e-mail server by specifying the username and password, let's say an example; if you want to send an email from abc@xyz.com, then you need to connect to the e-mail server of xyz.com.
  2. Create a message by specifying the recipient's addresses that can include Cc and Bcc addresses as well.
  3. Add attachments to the message if any.
  4. Transport the message to the e-mail ...

Get Spring: Developing Java Applications for the Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.