Apache Commons logo Commons Email


Release History

Version Date Description
1.5.1 2017-MM-DD  
1.5 2017-08-01  
1.4 2015-05-23  
1.3.3 2014-07-12  
1.3.2 2013-10-23  
1.3.1 2013-03-04  
1.3 2013-01-10  
1.2 2009-10-26  
1.1 2007-09-27  
1.0 2005-09-27  
1.0-rc8 2005-09-07  
1.0-rc6-SNAPSHOT in Subversion  

Release 1.5.1 – 2017-MM-DD

Type Changes By
Add Add Automatic-Module-Name MANIFEST entry for Java 9 compatibility. Fixes EMAIL-176. pschumacher
Fix Email.setBounceAddress no longer accepts invalid email addresses. Thanks to Alexander Lehmann. sgoeschl

Release 1.5 – 2017-08-01

Type Changes By
Fix Grammar error in comment. Fixes EMAIL-172. Thanks to Thomas Grainger. kinow
Fix MimeMessageUtils.writeMimeMessage writes stacktrace. Fixes EMAIL-169. sebb
Fix DataSourceClassPathResolver doesn't close InputStream when resolving resources. Fixes EMAIL-167. Thanks to Lucian Burja. sebb
Update Upgrade to javax.mail-1.5.6. Fixes EMAIL-165. sgoeschl
Update Remove "javax.activation" dependency since it is included in JDK 1.6 and update to javax.mail-1.5.5. Fixes EMAIL-161. sgoeschl
Add Add Support for International Domain Names. This change requires JDK 1.6+. Fixes EMAIL-160. sgoeschl
Add Add Email#getHeader(String) and Email#getHeaders() methods. Fixes EMAIL-154. Thanks to Ken Geis, Balachandran Sivakumar. ggregory
Fix CVE-2017-9801 - stripped all line-breaks from subjects in order to prevent SMTP header injection. ggregory

Release 1.4 – 2015-05-23

Type Changes By
Fix "Email" threw an "EmailException" when trying to send the email if neither a from nor bounce address was specified, although a "mail.from" property was set in the mail session. Fixes EMAIL-149. Thanks to Richard DiCroce. tn
Fix "ImageHtmlEmail" failed to embed attachments if their data source name was null. Fixes EMAIL-151. Thanks to Andreas Kohn. tn
Fix Html emails did not have the correct content-type set when using the Apache Geronimo JavaMail implementation v1.8.x. Fixes EMAIL-147. Thanks to Can Eskikaya. tn
Add Added getter for the bounce address of an email to class Email. Fixes EMAIL-146. Thanks to Alexander Lehmann. tn
Update Update Oracle JavaMail dependency from 1.4.5 to 1.5.2. Fixes EMAIL-144. ggregory
Fix An "HtmlEmail" with both, an html and plain text content but no attachments or embedded images will now be created with mimetype "multipart/alternative" instead of "multipart/mixed". Fixes EMAIL-142. Thanks to Marcin Tomiak. tn
Add Added support for mapping of content-ids to DataSource in "MimeMessageParser". Fixes EMAIL-141. Thanks to Stephen Kruger. tn

Release 1.3.3 – 2014-07-12

Type Changes By
Fix Fix test execution errors with Java 8. Fixes EMAIL-140. Thanks to Gary Gregory. tn
Fix The filename of an attachment was not properly encoded in case it contained non-ascii characters. Fixes EMAIL-138. Thanks to qed. tn
Fix MimeMessageParser did not correctly parse MimeMessage objects created by calling HtmlEmail.buildMimeMessage() and HtmlEmail.getMimeMessage(). Fixes EMAIL-137. Thanks to Alex Kogan. tn
Fix Fix Javadoc 1.8 errors. Fixes EMAIL-136. Thanks to Ville Skyttä. ggregory

Release 1.3.2 – 2013-10-23

Type Changes By
Update Change visibility of DataSourceUrlResourceResolver.createUrl(String) to protected so that sub-classes can override it. Fixes EMAIL-135. Thanks to Andreas Kohn. tn
Fix Support default mime charset property "mail.mime.charset" when adding text content to instances of either SimpleEmail or HtmlEmail. Fixes EMAIL-104. Thanks to Hiroshi Ikeda. tn
Add Added support for sending partial emails in case of invalid addresses. Fixes EMAIL-132. Thanks to Allen Xudong Cheng. tn
Fix The MimeMessageParser will now correctly parse MIME multi-parts of type "text/plain" and "text/html" with a content disposition header of "attachment". The parts will be added to the list of attachments even if there is no other text or html content. Fixes EMAIL-131. Thanks to Raju Y. tn
Fix Special characters in the body of an HTML email could lead to an exception when the mime message was built. Fixes EMAIL-127. Thanks to Dominik Stadler. tn

Release 1.3.1 – 2013-03-04

Type Changes By
Fix DataSourceClassPathResolver will now correctly set the DataSource name for resolved resources. Additionally, it is now possible to set the name for a ByteArrayDataSource. Fixes EMAIL-125. Thanks to Jean-Marc. tn
Fix Header values are not folded twice anymore. The actual encoding and folding is now only performed in Email.buildMimeMessage(). Fixes EMAIL-124. Thanks to Stefan Schueffler. tn

Release 1.3 – 2013-01-10

Type Changes By
Fix Use the provided Content-ID in HtmlEmail#embed(File, String) instead of creating a random one. The used and returned Content-ID will be URL encoded (see RFC 2392). Fixes EMAIL-101. Thanks to Andrew Starodub. tn
Fix Upgraded source and binary compatibility to JDK 1.5. Additionally the public/protected methods and fields have been properly generified. Fixes EMAIL-122. Thanks to sebb. tn
Fix Do not set the personal name of an address to the email address unless it is explicitly specified (affects TO, CC, BCC and FROM addresses). Fixes EMAIL-103. Thanks to David Rees. tn
Add Added new methods addTo(String[]), addCc(String[]) and addBcc(String[]) to Email. Fixes EMAIL-114. Thanks to Gokul Nanthakumar C. tn
Fix Removed emulation support for nested exceptions in EmailException. Fixes EMAIL-117. Thanks to sebb. tn
Fix Prevent external modification of internal array in DataSourceCompositeResolver. Fixes EMAIL-116. Thanks to sebb. tn
Fix Close temporary input stream in MultiPartEmail#attach(DataSource, String, String) to prevent locking of file resources on windows systems. Fixes EMAIL-120. Thanks to Mike Bell. tn
Fix The patch actually broke sending emails over a secured connection - disabled the "MAIL_SMTP_SSL_CHECKSERVERIDENTITY" and "MAIL_SMTP_SSL_ENABLE" activation. Tested the functionality using GMail, GMX and Office365 so the code is at least working for a couple of existing SMTP servers. Also added 'sslCheckServerIdentity' including setter and getter. Also added a chapter regarding "Security" to the user manual. Fixes EMAIL-105. Thanks to Siegfried Goeschl. sgoeschl
Fix Maven Site fails with error in Checkstyle configuration. Fixes EMAIL-113. Thanks to Peter Kofler. sgoeschl
Fix DataSourceFileResolverTest fails under IBM JDK 1.4 and 1.6 running on Windows. Fixes EMAIL-112. Thanks to Peter Kofler. sgoeschl
Fix Update the current trunk to be binary compatible with the commons-email-1.2 release. Fixes EMAIL-111. Thanks to Florian Pirchner. sgoeschl
Fix Added unit test to ensure that parsing the broken mime message does not cause an OutOfMemoryException. Fixes EMAIL-110. Thanks to Thomas Pummer. sgoeschl
Add ImageHtmlEmail should support class path resources. Fixes EMAIL-108. Thanks to Elisabeth Kasimir, Alexander Kasimir. sgoeschl
Fix Added mime.types to META-INF - the definition is actually found in activation.jar but did not work. Fixes EMAIL-107. Thanks to Claus Polanka, Michael Jakl. sgoeschl
Fix STARTTLS can be used even without authenticator. Fixes EMAIL-106. Thanks to Bruno Harbulot. sgoeschl
Fix Clarified the meaning of setTLS() which actually sends a "STARTTLS" command from the client to the SMTP server. Please note that some "protected" variables were renamed which could break existing code. Fixes EMAIL-105. Thanks to Bruno Harbulot. sgoeschl
Fix Fixed HtmlEmail embed toLowerCase bug with Turkish locale. Fixes EMAIL-102. Thanks to Okan Özeren. sgoeschl
Add Added a MultiPartEmail.attach(File) method since attaching a file is a simple and common. sgoeschl
Fix Specified Content-ID is now used when embedding a File object in an HtmlEmail. Fixes EMAIL-101. Thanks to Andrew Starodub. sgoeschl
Fix Restore Java 1.4 compatibility. niallp
Add Added MimeMessageParser and MimeMessageUtils. sgoeschl
Fix Throwing an IllegalStateException when setting mail session properties for an already created mail session because the settings would be ignored. Please note that this change could potentially break existing (but invalid) code. Fixes EMAIL-96. sgoeschl
Fix Encoding and folding of headers is now done by commons-email. Fixes EMAIL-98. Thanks to Mario Daepp. sgoeschl
Fix The default connection timeout is set to a reasonable default value of 60 seconds. Fixes EMAIL-100. Thanks to David Parks. sgoeschl
Fix Moving the various constants from 'EMail' to 'EmailConstants' sgoeschl
Fix All setters are returning "this" to simplify building an email. Fixes EMAIL-76. Thanks to Yu Kobayashi. sgoeschl
Fix Adding ImageHtmlEmail to create HTML emails with embedded images either downloaded from HTTP or from the local file system. Fixes EMAIL-92. Thanks to Dominik Stadler. sgoeschl
Fix Calling buildMimeMessage() before invoking send() caused duplicated mime parts for HtmlEmail. The implementation now enforces that an email can be only used once and throw an exception when multiple invocations of buildMimeMessage() are detected. Fixes EMAIL-95. sgoeschl
Fix Incorrect SMTP Port number shown in error message when an email fails to send due to a blocked port and SSL is used. Fixes EMAIL-91. Thanks to Kevin Lester. sgoeschl

Release 1.2 – 2009-10-26

Type Changes By
Update Changing groupId from "commons-email" to "org.apache.commons" because the 1.1 release was already using "org.apache.commons" sgoeschl
Fix Using "http://example.invalid" for a bad url - ".invalid" is reserved and not intended to be installed as a top-level domain in the global Domain Name System (DNS) of the Internet. Thanks to sebb. sgoeschl
Fix Made BaseEmailTestCase abstract and fixed a few coding issues. Thanks to sebb. sgoeschl
Fix HtmlEmail invokes java.net.URL.equals(Object), which blocks to do domain name resolution. This is avoided by using "url.toExternalForm().equals()" instead of "url.equals()". Fixes EMAIL-87. Thanks to sebb. sgoeschl
Add Email.setFrom and Email.addTo are using Email.charset to properly encode the name. Fixes EMAIL-75. Thanks to Yu Kobayashi. sgoeschl
Add SimpleEmail#setMsg() with UTF-8 content honors correct charset in header and does encode the content correctly now. Fixes EMAIL-79. Thanks to Edvin Syse, Corey Scott. sgoeschl
Add Created additional methods to support timeouts. Fixes EMAIL-84. Thanks to Claudio Miranda. sgoeschl
Add Create an overridable method in Email.java to create the MimeMessage instance. Fixes EMAIL-74. Thanks to Jim McCabe, Corey Scott. sgoeschl
Fix If setHostName() has not been called, getHostName() tries to return this.session.getProperty(MAIL_HOST). If mail session has not been created yet, this will throw a NullPointerException. Now getHostName() checks that this.session is not null before trying to access it. Fixes EMAIL-71. Thanks to Teemu Lang, Corey Scott. sgoeschl
Add Add getTo and getReplyTo to Email class. Fixes EMAIL-81. Thanks to Travis Reader, Corey Scott. sgoeschl
Fix Provide better diagnostics when attaching documents fail. Fixes EMAIL-78. Thanks to Aaron Digulla, Corey Scott. sgoeschl
Fix When mail authentication is required and no username/password is supplied than the provided mail session is used. If a username/password is found the implementation creates a new mail session and a DefaultAuthenticator as convinence implementation. Fixes EMAIL-70. Thanks to F. Andy Seidl. sgoeschl
Fix Using Kenneth's implementation of HtmlEmail.buildMimeMessage() to fix a couple of HtmlEmail layout issues. Also thanks to Martin Lau and Morten Hattesen for providing in-depth analysis of the problem. Fixes EMAIL-65. Thanks to Kenneth Gendron. sgoeschl
Fix During regression tests write out the generated MimeMessage instead of WiserEmail.toString(). sgoeschl

Release 1.1 – 2007-09-27

Type Changes By
Add Support embedding of raw DataSource attachments in HtmlEmail. Fixes EMAIL-35. Thanks to Brandon Wolfe. bspeakmon
Update Use wiser instead of dumbster for test cases. Original patch supplied by Bindul Bhowmik. Fixes EMAIL-64. Thanks to Ben Speakmon. bspeakmon
Fix Build patches to enforce source 1.4 and target 1.4 when compiling. Fixes EMAIL-62. Thanks to Ben Speakmon. dion
Fix Identical Inline images should share same BodyPart. Fixed by EMAIL-50. Fixes EMAIL-52. Thanks to Andrew Liles. dion
Fix Problems with HTML emails with attachments and embedded images. Fixed by EMAIL-50. Fixes EMAIL-28. Thanks to Phil Bretherton. dion
Fix HTML Emails with images don't display in Outlook 2000. Fix from Ben Speakmon. Fixes EMAIL-50. Thanks to Andrew Liles. dion
Fix Use JDK1.4 and java.nio.Charset instead of keeping our own. Fix from Ben Speakmon. Fixes EMAIL-54. Thanks to Piero Ottuzzi. dion
Fix not support content charset gb2312. Fixed by EMAIL-54. Fixes EMAIL-14. Thanks to locka. dion
Fix Address char-set can not be individually set. Fixed by EMAIL-54. Fixes EMAIL-25. Thanks to James Huang. dion
Fix setCharset() in Email does not set the charset for the message content. Fix provided by Ben Speakmon. Fixes EMAIL-1. Thanks to James Mc Millan. dion
Fix Enhance website scolebourne
Add Added Email.setReplyTo(Collection). Fixes EMAIL-45. Thanks to Dave Cherkassky. dion
Fix If you provide a mailSession in tomcat you cannot send email using commons-email: the problem is mainly caused by typos or missing constant declaration. Fixes EMAIL-37. Thanks to Piero Ottuzzi. dion
Add Added TLS helper methods on Email and Added setMailSessionFromJNDI(String) helper method. Fixes EMAIL-48. dion
Fix Added HtmlEmail.embed(String,String) as a wrapper to embed(URL,String). Fixes EMAIL-7. Thanks to Nuno Ponte. dion

Release 1.0 – 2005-09-27

No changes in this release.

Release 1.0-rc8 – 2005-09-07

Type Changes By
Fix Make sure that the unit tests don't fail under JDK 1.3.x with java.net.BindException: Address already in use henning
Update Replace our usage of address.validate() with simpler code that allows commons-email to work with javamail 1.2 / J2EE 1.3 environment. Added an unit test which verifies the behaviour. Fixes EMAIL-49. Thanks to Niall Pemberton. henning
Update Add an unit test to check for invalid addresses. Fixes EMAIL-58. Thanks to Niall Pemberton. henning
Update Remove dependencies to commons-lang, allowing commons-email to exist without any external dependencies in an J2EE 1.4+ environment. Fixes EMAIL-12. Thanks to Stephen Colebourne. henning

Release 1.0-rc6-SNAPSHOT – in Subversion

Type Changes By
Update Improve MultiPartEmail to ease extending it. Fixes EMAIL-51. Thanks to Troy Poppe. epugh
Update Refactoring the code to seperate creation of a MimeMessage and sending it. sgoeschl
Update Add serialVersionUID to EmailException dion
Update Use Dumbster 1.6 compiled with jdk13 for testing dion
Fix Refactor Hashtable usage to Map. Fixes EMAIL-24. Thanks to Eric Spiegelberg. dion
Add Email throws EmailException wrapping underlying JavaMail exception. Fixes EMAIL-42. Thanks to Mark Lowe. epugh
Add Change port for dumbster from 25 to 2500 to use unreserved port. Fixes EMAIL-32. Thanks to Corey Scott. epugh
Add Add back in ByteArrayDataSource. Fixes EMAIL-3. Thanks to Corey Scott. epugh
Remove Removed deprecated MailMessage and ByteArrayDataSource. epugh
Add Output test emails to /target/test-emails as .txt files for manual review. epugh
Add Inline attatchment encoding was incorrect. Fixes EMAIL-19. Thanks to Mark Lowe. epugh
Add Integrate our own checkstyle config instead of using Turbine style only. epugh
Add Clone the System.getProperties() call instead of putting random properties into it. Fixes EMAIL-55. Thanks to Joe Germuska. epugh
Add Can't supply a javax.mail.Session to Commons Email component. Fixes EMAIL-8. epugh
Add HTML email with plain text alternative and attachments. Fixes EMAIL-23. Thanks to Corey Scott. epugh
Add Integrate use of Dumbster to supply a fake SMTP server. Fixes EMAIL-33. Thanks to Corey Scott. epugh
Add Lots of new unit tests and cleanup of code. Thanks to Corey Scott. epugh
Update Update dependencies to latest available. epugh
Add Support the delivery of bounced messages to an address other than "from". Fixes EMAIL-55. germuska