
Simple Java Mail
Simple Java Mail is the simplest to use lightweight mailing library for Java, while being able to send complex emails including Batch processing and server clusters, CLI support, authenticated socks proxy(!), attachments, embedded images, custom headers and properties, robust address validation, build pattern and even DKIM signing, S/MIME support and external configuration files, Spring support and Email conversion tools (including support for Outlook).
Just send your emails without dealing with RFCs.
The Simple Java Mail library is a thin layer on top of Angus Mail (previously Jakarta Mail) that allows users to define emails on a high abstraction level without having to deal with mumbo jumbo such as 'multipart' and 'mimemessage'.
Simple Java Mail is available in Maven Central:
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
<version>8.12.6</version>
</dependency>
Read about additional modules you can add here: simplejavamail.org/modules.
Latest Progress
v8.12.0 - v8.12.6
- v8.12.6 (18-April-2025): #595: [bug] Spring configuration - fix support for simplejavamail.extraproperties
- v8.12.5 (05-March-2025): Bumped PATCH versions of various dependencies #553, #554, #555, #562, #567
- v8.12.4 (12-December-2024): #558: [bug] Mailer.close() exception because it attempts to shutdown batch-module connection pools, even if not available on the classpath
- v8.12.3 (25-November-2024): #563: [enhancement] Add getter for Authenticated SOCKS server port
- v8.12.2 (05-October-2024): #552: [bug] support iCalendar events with METHOD defined in body instead of Content-Type
- v8.12.1 (02-October-2024): #533: [maintenance] Bump com.github.therapi:therapi-runtime-javadoc-scribe from 0.13.0 to 0.15.0
- v8.12.1 (02-October-2024): #532: [maintenance] Bump com.sanctionco.jmail:jmail from 1.4.1 to 1.6.3
- v8.12.1 (02-October-2024): #531: [maintenance] Bump com.github.bbottema:java-socks-proxy-server from 4.0.0 to 4.1.2
- v8.12.1 (02-October-2024): #528: [maintenance] Buump com.github.davidmoten:subethasmtp from 7.0.1 to 7.1.1
- v8.12.1 (02-October-2024): #522: [maintenance] Bump jakarta.annotation:jakarta.annotation-api from 1.3.5 to 3.0.0
- v8.12.0 (26-September-2024): #550: [bug] Environment variables are not being loaded properly
- v8.12.0 (26-September-2024): #538: [bug] System properties are only read if configuration file exists in class path
- v8.12.0 (26-September-2024): #546: [Enhancement] Trim whitespace in encoder values for Content-Encoding
v8.11.0 - v8.11.3
- v8.11.3 (15-September-2024): #543: [Enhancement] reduce log spam from the batch-module
- v8.11.2 (08-June-2024): #530: [Bug] After converting Outlook .msg to EML, bullet lists have duplicate numbering HTML converted from RTF
- v8.11.1 (28-May-2024): #529: Bump smtp-connection-pool from 2.3.2 to 2.3.3 which improves performance and fixes a rare ConcurrentModificationException
- v8.11.1 (28-May-2024): #527: Bump org.slf4j:slf4j-api from 2.0.9 to 2.0.13
- v8.11.1 (28-May-2024): #523: Bump org.jacoco:jacoco-maven-plugin from 0.8.5 to 0.8.12
- v8.11.0 (25-May-2024): #526: When reading .msg files the RTF converted to HTML is garbled in some cases where the appropriate charset is not detected properly
NOTE: v8.11.0 contains many (minor) dependency updates to resolve CVE issues, including:
- parent POM upgrade: Upgrades test dependencies as well as SLF4J versions
- outlook-message-parser 1.13.2 -> 1.14.0
- java-reflection 4.0.1 -> 4.0.2
- smtp-connection-pool 2.3.1 -> 2.3.2
- utils-mail-dkim 3.1.0 -> 3.2.0
- jakarta.mail-api 2.1.2 -> 2.1.3
- angus-mail 2.0.2 -> 2.0.3
- therapi-runtime-javadoc 0.13.0 -> 0.15.0
- kryo 5.0.0-RC1 -> 5.6.0
- maven-assembly-plugin 3.1.0 -> 3.7.1 (only for the CLI module during build)
v8.10.0 - v8.10.1
- v8.10.1 (04-May-2024): #510: Update upstream dependency generic-object-pool, which solves a critical bug when there are exceptions during allocation
- v8.10.0 (30-April-2024): #508: [enhancement+bug] Make EmailConverter API more consistent regarding Session parameter, don't use
Session.getDefaultInstance anymore and fix bug where emlToEmailBuilder used emlToMimeMessage
v8.9.0 (26-April-2024)
- #507: [security] Update 3rd party dependencies to get rid of all currently known CVE issues (see issue for details)
v8.8.0 - v8.8.4
- v8.8.4 (23-April-2024): #506: [CVE] Upgrade utils-mail-smime dependency to 2.3.2, to resolve CVE issue in bouncycastle
- v8.8.3 (13-April-2024): #502: [Bug] Message headers not treated with case insensitivity as per RFC, causing deviating headers to slip through the filters
- v8.8.2 (05-April-2024): #495: Add config support for 'verifyingServerIdentity' with SMTP, also: since Angus 1.1.0 (8.6.0) server identity checks are on by default and can be countered by mailerBuilder.verifyingServerIdentity(false)
- v8.8.2 (05-April-2024): #501: [dependency] Update outlook-message-parser dependency, which has improved support for X500 addresses
- v8.8.2 (05-April-2024): #499 (fix): [maintenance] Added missing finer-grained DKIM Spring Boot properties
- v8.8.1 (04-April-2024): #500: [bug] Fix parsing addresses from headers in EML files, like a Disposition-Notification-To with umlaut
- v8.8.0 (22-March-2024): #499: [Enhancement] Expose finer-grained DKIM configuration through the builder api and disable 'l-param' by default)
NOTE: release 8.8.0 changes the default for DKIM signing from 'l-param' true to false. If you rely on this feature, you need to enable it explicitly. Refer to the DKIM documentation for the update.
v8.7.0 - v8.7.1
- v8.7.1 (20-March-2024): #498: Make S/MIME algorithms configurable (signature algorithm for signing, key encapsulation and cipher algorithms for encryption)
- v8.7.1 (20-March-2024): #497: Order of attachments is lost when converting a MimeMessage to an Email
- v8.7.0 (20-March-2024): don't use this version: versioning messed up
NOTE: this breaks the API for S/MIME related builder methods. Refer to the S/MIME documentation for the new API.
v8.6.0 - v8.6.3
- v8.6.3 (13-February-2024): #491: [bug] Attachment body parts should separately parse Content-Disposition and ContentID, possible resulting in a downloadable attachment that is also embedded
- v8.6.2 (27-January-2024): #493: [bug] don't require smime-module when adding collection of headers (also used when copying email)
- v8.6.1 (18-January-2024): #487: Move header filtering from MimeMessageParser to EmailConverter, thereby enabling access to all parsed headers when using MimeMessageParser directly
- v8.6.1 (18-January-2024): #489: Finished update to Angus Mail by updating activation dependency
- v8.6.0 (17-January-2024): #489: Update to Angus Mail
NOTE: this release switches to Angus Mail which should be a transparent change, but if you encounter any issues, please report them.
One known issue is that Angus, since 1.1.0, performs server identity checks by default, which was previously disabled for SMTP. If you encounter issues with this, you can disable it with mailerBuilder.verifyingServerIdentity(false) and starting from 8.8.2, this also works with SMTP transport strategy (see #495).
v8.5.0 - v8.5.1
- v8.5.1 (15-December-2023): #486: [dependency] Handle Outlook's Non-Standard S/MIME Signed Messages
- v8.5.0 (13-December-2023): #484: [bug] Addresses passed as string are not always interpreted correctly
v8.4.0 (12-December-2023)
- #483: Enhancement: add native support for overriding envelope-level receiver(s)
v8.3.0 - v8.3.5
- v8.3.5 (10-December-2023): #482 Bug: 'IllegalArgumentException: emailAddressList is required' when parsing mail with incorrect recipients from Outlook message
- v8.3.4 (08-December-2023): #481 Enhancement: don't crash on invalid empty embedded images when parsing Outlook messages
- v8.3.3 (03-December-2023): #477 Enhancement: Support Exchange proprietary addresses (X.500 DAP)
- v8.3.2 (26-November-2023): #480 Bug: Multiple attachments with same name get the same Content-ID, causing them to refer to the same file content
- v8.3.1 (09-October-2023): #440 Bug: names manually specified for em