Sun GlassFish Enterprise Server 2.1 Developer's Guide

Introducing JavaMail

The JavaMail API defines classes such as Message, Store, and Transport. The API can be extended and can be subclassed to provide new protocols and to add functionality when necessary. In addition, the API provides concrete subclasses of the abstract classes. These subclasses, including MimeMessage and MimeBodyPart, implement widely used Internet mail protocols and conform to the RFC822 and RFC2045 specifications. The JavaMail API includes support for the IMAP4, POP3, and SMTP protocols.

The JavaMail architectural components are as follows:

For more information, see Chapter 5, Configuring JavaMail Resources, in Sun GlassFish Enterprise Server 2.1 Administration Guide and the JavaMail specification at A useful JavaMail tutorial is located at