[an error occurred while processing this directive]

Introduction to Java Mail API

                         

The Java Mail API allows the developers to add mailing functionalities to their java applications. In this section we will introduce you with the Java Mail API.

The Java Mail API provides a platform-independent framework to develop mail and messaging applications in Java technology. Java Mail API is also protocol-independent making it more useful. You can use many different protocols to work with mails and messages.

Java mail api is designed to provide functionality such as read, compose and send from within your java programs.

Getting Java Mail API

The Java Mail API 1.4.1 supports JDK 1.4 or higher version. Current version of Java Mail API can be downloaded from the link given below:

http://java.sun.com/products/javamail/downloads/index.html

Installing Java Mail API

Steps to install Java Mail

  1. Unzip the javamail-1_4_1.zip archive.
  2. Set CLASSPATH to include the "mail.jar" file obtained from the download

After installing Java Mail API, be sure that Java Beans Activation Framework is installed. Java Mail will work with JAF 1.0.2, but it is recommend to use of JAF 1.1 (currently the newest version).

Download the JAF 1.1 zip from the link given below:

http://java.sun.com/javase/technologies/desktop/javabeans/jaf/downloads/index.html

Steps to install Java Beans Activation Framework

  1. Unzip the jaf-1_1_1.zip archive.
  2. Set CLASSPATH to include the "activation.jar" file obtained from the download

Note: JAF 1.1 is included in JDK 1.6 and JAF 1.1.1 will be included in a future JDK 1.6 update release.

Possible Uses

  1. Send Email from any type of java application.
  2. Composing, reading and sending electronic mail.
  3. Send Email from java stored procedure.
  4. Create a GUI Email client.
  5. Dealing with sending and receiving attachments with Email.
  6. To search for messages.

                         

[an error occurred while processing this directive]