In any enterprise application, sending emails is a very common action to perform during many user interactions with your application. Some example use cases of sending email within your enterprise application include:
- Sending confirmation and welcoming emails upon user registration
- Sending password reset links to users who forget their passwords
- Sending an email notifying users about different events or announcements they may be interested in
The Java Mail API provides Java standard interfaces used to access email features within your enterprise application. You can use it both to send mails to some recipients, and access (retrieve) you email messages from your inbox.
In the next sections, we are going to cover:
- A brief introduction to the main mailing protocols
- Programmatically sending plain text and HTML emails
- Specifying the To, CC, and BCC...