Category: 20. Java Mail
-
Sending Emails
Now that we have a fair idea about JavaMail API and its core classes, let us now write a simple programs which will send simple email, email with attachments, email with HTML content and email with inline images. Basic steps followed in all the above scenarios are as below: In the following sections we have…
-
Core Classes
The JavaMail API consists of some interfaces and classes used to send, read, and delete e-mail messages. Though there are many packages in the JavaMail API, will cover the main two packages that are used in Java Mail API frequently: javax.mail and javax.mail.internet package. These packages contain all the JavaMail core classes. They are: Class Description javax.mail.Session The key…
-
Environment Setup
To send an e-mail using your Java Application is simple enough but to start with you should have JavaMail API and Java Activation Framework (JAF) installed on your machine. You will need the JavaBeans Activation Framework (JAF) extension that provides the javax.activation package only when you’re not using Java SE 6 or newer. Download and unzip these files, in the newly created top…
-
Overview
The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. The JavaMail API provides a set of abstract classes defining objects that comprise a mail system. It is an optional package (standard extension) for reading, composing, and sending electronic messages. JavaMail provides elements that are used to construct an interface…