First published version.
- New fire and forget async send method. See
Mail.sendAsync()
. - Some notable changes on the content generation helpers. More info
in the wiki
The main code for sending simple mails hasn't changed.
TL;DR Don't use
MailBuilder
anymore, useMail.bodyBuilder()
.
Migration guide:
Where you had
MailContent mailContent = new MailContent()
[content stuff here]
.close();
MailBuilder.using(configuration)
.content(mailContent)
[mail envelope stuff here]
.build()
.send();
You can translate it to this beauty:
Mail.using(configuration)
.body()
[content stuff here]
.mail()
[mail envelope stuff here]
.build()
.send();
- New method to add inline images thanks to Lance Reid. See PR.
- New method to retrieve the body of the response. Useful to check more information in the event of errors.
- Fixed dependency: Jersey 2.25 as >=2.26 targets Java EE 8 and Java 8 language level.
- New low level functions on the HTML builder.
- Fixed some null handling
- Configuration now can store default parameters to be used when they are not specified on each mail building process. Inspired by this issue report
- New methods to retrieve parameter values from a Mail instance
- New configuration facility to provide default callbacks for async sending
- Fixed callback factory lacking context (Mail reference). Breaks v1.7.0 compatibility. Sorry about that, even if v1.7.0 lived only one day.
- New mail filter to decide mail sending per instance.
- Fixed text content missing line separators
- New configuration options to define timeouts for the underlying connection client. #29
- JAX-RS client reuse, better performance under load. Remember to reuse the Configuration object and close it when it's no longer needed. It's safe to use just one for the entire life of the application.
- security improvements
- Merged PR to add convenience methods to work with Mailgun's templates
- Updated Gradle to version 6, now the project is built with Java 11 but keeping compatibility with Java 7 for now.
- Due to the sunsetting of bintray I'm now publishing directly to Maven Central via Sonatype.
- Migration to
jakarta.*
package name prefix: #46 - If you need to keep compatibility with
javax.*
stick with versions 1.x.x