Home Javamail Introduction to Java Mail API
Questions:Ask|Latest

 
 

Share on Google+Share on Google+

Introduction to Java Mail API

Advertisement
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.

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.

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 18, 2008

Related Tutorials

Ask Questions?    Discuss: Introduction to Java Mail API  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
ashwini
February 4, 2012
what is need for this application?

instead of using this application we can use internet exploer by means of creating a program and send it to whom we want to send
prakhar
June 30, 2012
class path setting

syntax to set class path for mail.jar
nithin
December 1, 2012
java

how can we integrate java mail service in a web application
DMCA.com