Grow with us: Join Postmark's new referral partner program and start earning
x

Send emails with Java

See why Postmark API is trusted by Java projects to send transactional emails

Official Library

The Postmark Java library makes it easier to use the Postmark API from your Java 8+ projects without having to build your own API calls.

Community Libraries

5 Minute Set Up

1

Add the Postmark dependency to your project

<dependency>
  <groupId>com.wildbit.java</groupId>
  <artifactId>postmark</artifactId>
  <version>{version}</version>
</dependency>

Note: To retrieve latest version number, visit the maven central repository.

2

Send an email

ApiClient client = Postmark.getApiClient("POSTMARK-SERVER-API-TOKEN-HERE");
Message message = new Message("sender@example.com", "recipient@example.com", "Hello from Postmark!", "Hello message body");
MessageResponse response = client.deliverMessage(message);

Want to test our APIs and activity logging? Send emails to test@blackhole.postmarkapp.com

3

Once you’ve sent your first email, check out the Java library docs →

Check out what customers are saying

I was using SendGrid's free plan when it suddenly stopped worked because their IP had been blacklisted and blocked during a critical radio station fundraiser for an account. Their support's response was if we paid for Pro it would work because the "free" plan is used for testing, although I know that's not the case. I switched to Postmark and within 45 seconds under the free trial all the emails were being delivered. Each and every single one of them. Thank you Postmark for a superior software product!

Leslie

Leslie

Owner at Cats Meow Design

Postmark has made it easier to help our customers because of its accessible and detailed activity log which means we get better information faster.

Kate Reynier

Kate Reynier

Customer Success Team Lead at YouCanBook.me

Postmark makes it easy for us to handle all our outbound emails with a high degree of reliability and easy way to get insights into what messages are working with our customers (via tags and analytics).

Brian Lovin

Brian Lovin

Co-Founder at Spectrum

Postmark ensures that the mail from our customers gets delivered to their customers.

Robert Barney

Robert Barney

Managing Director at Fresh Milk Software

From side projects to Fortune 500...

We’ve got you covered. We process transactional email for companies of all sizes:

Everything you want for first class email delivery

A comprehensive suite of tools to help you seamlessly integrate email with your Java application.

  • Placeholder

    We’re focused on building the best reputation in the industry for transactional email.

  • Envelope flying into postbox.

    Industry-leading delivery speeds. Up to 4x faster than other providers.

  • Stack of emails

    45 days worth of full content history by default to help you troubleshoot (customizable from 7 to 365 days if needed).

  • Placeholder

    Responsive templates for sending transactional emails, including welcome messages, password resets, and more.

  • Placeholder

    Keep track of bounced emails through the web dashboard, or use web hooks to notify your app of any issues.

  • Placeholder

    Easy integration via API or SMTP so you can start sending in minutes.

Lightning fast delivery

Your customers expect transactional emails to arrive immediately—not eventually.
We constantly monitor our delivery speeds and share the data publicly.

  • Gmail

  • Apple

  • Hotmail

  • AOL

  • Yahoo

Time to Inbox data updated every 5 minutes

Ready to take it for a spin?

Join thousands of developers that already trust their email delivery to Postmark.