The JavaMail API provides a platform-independent and protocol-independent framework to build mail and messaging applications. The JavaMail API is available as an optional package for use with the Java SE platform and is also included in the Java EE platform.
Table of Contents
- Latest News
- Download JavaMail Release
- API Documentation
- Development Releases
- JavaMail for Android
- Project Documentation
August 29, 2018 - JavaMail 1.6.2 Final Release
The 1.6.2 release contains bug fixes and enhancements, including the following significant changes:
- Support loading protocol providers using ServiceLoader
- http proxy support should support authenticating to the proxy server
Note that the JavaMail project will be moving to the Eclipse Foundation as part of the Eclipse Enterprise for Java project over the next several weeks. Future releases will be done as part of the Eclipse project for JavaMail.
April 28, 2017 - JavaMail moves to GitHub!
Welcome to the new home of the JavaMail API project on GitHub! This project hosts the downloads and source code for the JavaMail API reference implementation. The JavaMail reference implementation is licensed under the Common Development and Distribution License (CDDL) v1.1 and GNU General Public License (GPL) v2 with Classpath Exception.
The latest release of JavaMail is 1.6.2.
The following table provides easy access to the latest release. Most people will only need the main JavaMail reference implementation in the javax.mail.jar file.
|The JavaMail reference implementation, including the SMTP, IMAP, and POP3 protocol providers
|Overview of the release
|Additional notes about using JavaMail
|Notes on using SSL/TLS with JavaMail
|Notes on using NTLM authentication with JavaMail
|Changes since the previous release
|Important notes about compatibility
In addition, the JavaMail jar files are published to the Maven repository. The main JavaMail jar file, which is all most applications will need, can be included using this Maven dependency:
|The JavaMail reference implementation jar file, including the SMTP, IMAP, and POP3 protocol providers
|The JavaMail API definitions only, suitable for compiling against; use only with a Maven “provided” dependency scope
|The JavaMail reference implementation with no protocol providers; use with one of the following providers
|The SMTP protocol provider
|The IMAP protocol provider
|The POP3 protocol provider
|An EXPERIMENTAL Gmail IMAP protocol provider that supports Gmail-specific features
|Support for parsing and creating messages containing Delivery Status Notifications
|A java.util.logging handler that uses JavaMail, suitable for use in Google App Engine.
The JavaMail API is defined through the Java Community Process as JSR 919.
The following documents summarize the API changes in each release of the JavaMail API specification:
Some sample programs showing how to use the JavaMail APIs are available here.
Please read the JavaMail FAQ! Read it again. Tell everyone you know to read it. Thank you!
Finally, you can send mail directly to the JavaMail team at email@example.com.
JavaMail bugs are tracked in the GitHub JavaMail project issue tracker.
From time to time snapshot releases of the next version of JavaMail under development are published to the java.net Maven repository. These snapshot releases have received only minimal testing, but may provide previews of bug fixes or new features under development.
For example, you can download the javax.mail.jar file from the JavaMail 1.6.3-SNAPSHOT release here. Be sure to scroll to the bottom and choose the jar file with the most recent time stamp.
The latest release includes support for JavaMail on Android. See the Android page for details.
You’ll find more information about the protocol providers supported by JavaMail on the following pages:
If you’re interested in writing your own protocol provider (most people won’t need to), you can find more documentation on protocol providers here.
The following pages provide hints and tips for using particular mail servers:
The following pages provide hints and tips for using JavaMail on particular operating systems or environments:
See Build Instructions for instructions on how to download and build the most recent JavaMail source code. You can also find a bundle of the source code for the most recent JavaMail release in the Releases area of this project.
If you’re interested in contributing to JavaMail, see the Contributions page.
You can find a list of products related to JavaMail on the Third Party Products page.
Please see our page of links to additional information about JavaMail and Internet email and our list of books about JavaMail and Internet email.
To understand the JavaMail license, see the License page.