| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Simple Java Mail is the simplest to use lightweight mailing library for Java, while being able to send complex emails including authenticated socks proxy(!), attachments, embedded images, custom headers and properties, robust address validation, build pattern and even DKIM signing and external configuration files with property overriding. Just send your emails without dealing with RFC's.
The Simple Java Mail library is a thin layer on top of the JavaMail smtp mailing API that allows users to define emails on a high abstraction level without having to deal with mumbo jumbo such a 'multipart' and 'mimemessage'.
ConfigLoader.loadProperties("simplejavamail.properties"); // optional default
ConfigLoader.loadProperties("overrides.properties"); // optional extra
Email email = new Email();
email.addRecipient("lollypop", "lolly.pop@somemail.com", Message.RecipientType.TO);
email.setReplyToAddress("lollypop", "lolly.pop@othermail.com");
email.addRecipient("C. Cane", "candycane@candyshop.org", Message.RecipientType.TO);
email.addRecipient("C. Bo", "chocobo@candyshop.org", Message.RecipientType.CC);
email.setSubject("hey");
email.setText("We should meet up! ;)");
email.setTextHTML("<img src='cid:wink1'><b>We should meet up!</b><img src='cid:wink2'>");
email.addEmbeddedImage("wink1", imageByteArray, "image/png");
email.addEmbeddedImage("wink2", imageDatesource);
email.addAttachment("invitation", pdfByteArray, "application/pdf");
email.addAttachment("dresscode", odfDatasource);
email.signWithDomainKey(privateKeyData, "somemail.com", "selector");
new Mailer(
new ServerConfig("smtp.host.com", 587, "user@host.com", "password"),
TransportStrategy.SMTP_TLS,
new ProxyConfig("socksproxy.host.com", 1080, "proxy user", "proxy password")
).sendMail(email);Simple Java Mail is available in Maven Central:
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
<version>4.1.2</version>
</dependency>
v4.1.2 (07-Nov-2016)
v4.1.1 (30-Jul-2016)
v4.1.0 (22-Jul-2016)
v4.0.0 (05-Jul-2016)
NOTE: All packages have been renamed to "org.simplejavamail.(..)" NOTE: Switched to Java 7
v3.1.1 (11-May-2016)
Major feature: DKIM support!
NOTE: this is the last release still using Java 6. Next release will be using Java 7.
v3.0.2 (07-May-2016)
v3.0.1 (29-Feb-2016)
v3.0.0 (26-Feb-2016)
v2.5.1 (19-Jan-2016)
v2.5 (19-Jan-2016)
v2.4 (12-Aug-2015)
v2.3 (21-Jul-2015)
v2.2 (09-May-2015)
v2.1 (09-Aug-2012)
v2.0 (20-Aug-2011)
v1.9.1 (08-Aug-2011)
v1.9 (6-Aug-2011)
v1.8
v1.7 (22-Mar-2011)
Added support for SSL! (tested with gmail)
known possible issue: SSL self-signed certificates might not work (yet). Please let me know by e-mail or create a new issue
v1.6
Completed migration to Java Simple Mail project.
v1.4 (15-Jan-2011)
vX.X (26-Apr-2009)
| Back | FazBrowse Home | New Git URL |