Open Source Java Mailing Library for Complex Emails
Java Mailing API that allows developer to add attachments to Email messages, embedded images, add custom headers, CLI & S/MIME support inside Java apps.
Simple Java Mail is an open source lightweight Java mailing library that provides functionality for working with emails inside their Java applications. The library is very simple and easy to use the mailing library for sending emails using SMTP. Other great feature is that it allows users to convert between outlook MSG, EML, MimeMessage, and Email. The library has included Spring support and users can easily read properties from the Spring context.
The library is very lightweight but still very powerful and is the only java mailing library that can send through an authenticated SOCKS proxy or let users configure a cluster of connection pools. Simple Java Mail gets matured with the passage of time and has included support for some important features, such as adding attachments to email messages, embedded images, adding custom headers and related properties, CLI support, S/MIME support, advanced batch processing, user interfaces for email validation and sending, Spring support and Email conversion tools and many more.
The Simple Java Mail library always performs some basic validation such as CRLF injection attacks, verifies email addresses, check connection and security properties, and many more. One other great aspect of the API is that it has included alternative ways for doing things for almost everything, for example, you can add your own Recipient instances or can add comma/semicolon separated addresses..
At A Glance
An overview of Simple Java Mail features.
- Read emails
- CRLF injection attacks
- OST support
- Embedded images
- CLI support
- S/MIME support
- Add custom headers
- Adding attachments
- View attachment
- Email encryption
- Unicode support
- Batch processing
Simple Java Mail supports popular Microsoft Outlook file formats listed below.
Simple Java Mail only requires Java run-time.
Getting Started with Simple Java Mail
First of all, you need to install JDK 1.6 or higher. You need to add the following maven dependency in pom.xml.
<dependency> <groupId>org.simplejavamail</groupId>s; <artifactId>simple-java-mail</artifactId> <version>6.4.3</version> </dependency>
Email Conversion b/t MimeMessage, EML and Outlook MSG
The open source Simple Java Mail library enables software developers to convert the email between different email types. It also includes reading S/MIME protected emails from the file. You can easily convert email objects, EML data, and even Outlook MSG files to MimeMessage. It is also very easy to build a mass Outlook MSG to EML converter.
Add Attachments to Email using Java
The open source Simple Java Mail library allows software developers to add Attachments to their email messages with just a couple of lines of Java code. It is very easy to add an attachment but you have to provide data yourself. Don’t worry it can be anything, a PDF document, A word processing document, an image, an Excel CSV spreadsheet, or anything else.
Adding Custom Headers to Your Emails
The Simple Java Mail library makes it easy for Java developers to add custom headers and it’s relevant properties to their email messages inside their own applications. It is often required to add extra headers inside your email messages because the email server, recipient server, or your email client needs it. Whatsoever can be the reason, it is very easy to ad headers inside your email messages using The Simple Java Mail library.
Email Addresses Validation
It is very important for companies to have a valid email address to communicate with their customers via email. Many times the email address is the sole means to interconnect with a particular individual. The Simple Java Mail library can easily validate your email addresses and makes your hard job easy for you. The library automatically performs address validation when sending emails. It also allows users to directly perform validations inside their Java apps. The library validation is not a simple regex check, but it provides a complete and robust full validation.