Simple to use.
Built for the real world.

Send a well-formed email with a small fluent API. If you later need DKIM, S/MIME, proxies, batch sending, or multiple SMTP clusters, you keep using the same builders and mailer.

FirstSend.java v9.2.0
Email email = EmailBuilder.startingBlank()
    .from("Sender", "sender@example.org")
    .withRecipients(new RecipientBuilder()
        .withAddress("recipient@example.net")
        .withType(TO)
        .build())
    .withSubject("It works")
    .withPlainText("Your first message.")
    .buildEmail();

mailer.sendMail(email);
SMTP submission 250 2.0.0 queued
Current releasev9.2.08 August 2026
RuntimeJava 8+Source and target
LicenseApache-2.0Open source
FoundationAngus / Jakarta MailStandards and transport

Build, protect, send

From first draft to SMTP hand-off

Start with the message. Add security, shared defaults, and faster delivery only when you need them.

  1. 01

    Compose

    Rich messages and recipients without constructing MIME trees.

    Message API
  2. 02

    Configure

    Configure a mailer once with server settings, defaults, overrides, or Spring.

    Configuration
  3. 03

    Protect

    Transport policy, OAuth2, DKIM, S/MIME, and injection protection.

    Security
  4. 04

    Deliver

    Send once, keep a connection open, or use pooled SMTP clusters.

    250 accepted
    Delivery modes
  5. 05

    Diagnose

    Test the connection, inspect settings, capture debug output, and read server replies.

    Diagnostics
  6. 06

    Extend

    Add the module you need, use raw Jakarta Mail properties, or provide your own send operation.

    Extension points

The same API as needs grow

Start small without starting over.

Your first mailer can stay small. When you add signing, validation, proxies, or pooling, those settings stay with the mailer instead of spreading through every place that sends an email.

See why the API holds up
01 · connect .withSMTPServer(host, port, user, password)
02 · protect .withTransportStrategy(SMTP_TLS)
03 · set defaults .withDefaultDkimSigning(dkimConfig)
04 · scale .async().withClusterKey(workload)

When email gets harder

The difficult parts are already there.

01EmailBuilder

Messages and recipient rules

Compose plain text, HTML, embedded images, attachments, and calendar content. Then centralize validation, defaults, forced overrides, bounce handling, receipts, and per-recipient S/MIME certificates.

Explore
02MailerBuilder

Security with a usable API

Match the transport strategy to your server, authenticate with OAuth2, verify its identity, block header injection, sign with DKIM, and sign or encrypt content with S/MIME.

Explore
03Mailer

Sending you can see and control

Handle async results, test connections, inspect the settings in use, capture Jakarta Mail debug output, bind a local address, reuse a connection, or move to pooled sending.

Explore

Less common, still supported

The edge cases are part of the design.

Most applications never need these. The ones that do should not have to replace their mail library or invent infrastructure around it.

Many servers, one mailer

batch-module

Multiple SMTP clusters

Give each workload its own connection pool and set of SMTP servers. That can isolate tenants, use more than one provider, or keep transactional mail separate from batch work.

Configure clusters

Network constraints

authenticated-socks-module

Authenticated SOCKS

Send through a SOCKS proxy that requires a username and password without changing the mailer configuration model.

Configure a proxy

Compare your options

The difference is how much code you still have to write.

Jakarta Mail gives you direct control. Spring Mail fits sending into a Spring application. Commons Email simplifies common message types. Simple Java Mail also takes care of security, reusable configuration, diagnostics, and advanced sending.

Compare the approaches

Ready when you are

Add one dependency.

Start with simple-java-mail. Add another module only when you need features such as DKIM, S/MIME, pooling, or Spring integration.

org.simplejavamail:simple-java-mail:9.2.0 Get started