Navigation



EmailUtils

EmailUtils is a utility library for sending emails from Java. It wraps the JavaMail API and makes it available in a more rational and developer friendly way.

The classes in EmailUtils were originally part of the StandardUtils library but where moved to their own library when I wanted to remove the JavaMail dependency from StandardUtils.

Here is an example of how to send Email with two attachments using EmailUtils:

SimpleEmail email = new SimpleEmail();

email.setSenderName("John Doe");
email.setSenderAddress("john@doe.com");
email.addRecipient("someone@theinternets.com");
email.setSubject("Hi there");
email.setMessage("Why does the JavaMail API makes things look so complicated when they can be this simple!");

email.add(new FileAttachment(new File("somefile.zip")));
email.add(new StringAttachment("This is a text attachment",SimpleEmail.TEXT));

getEmailSender().send(email);

Releases

Version Release date Download Changelog
1.2.4 6/5 2015 EmailUtils-1.2.4.jar (26 KB) link
1.2.0 10/9 2014 EmailUtils-1.2.0.jar (25 KB) link
1.0.0 30/10 2012 EmailUtils-1.0.0.jar (24 KB)  -

Depencies

EmailUtils has the following dependencies:

Source code

The source code is copyright Robert Olofsson and various other committers. It is available under the LGPLv3 license from the following subversion repository: svn://svn.unlogic.se/utils/emailutils