โ— Shell
clean mode source โ†—

Java | Guides | Mailtrap Help Center

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Java

Learn how to integrate Mailtrap with Java applications using SDK, SMTP, or RESTful API for email sending.

Mailtrap Java SDK on GitHub

Mailtrap can be integrated with Java apps and projects for email sending with SDK, SMTP, and RESTful API.

The Mailtrap Java SDK is a robust, enterprise-ready library for sending transactional and bulk emails from Java applications. The SDK supports:

  • Transactional email sending

Add the SDK to your project using your preferred build tool:

Here's a minimal example to send your first email:

Get your API token from your Mailtrap account under Settings โ†’ API Tokens.

To integrate SMTP with your Java app, navigate to the Integrations tab and copy-paste the credentials or ready-made code snippet into your configuration.

SMTP integration is compatible with any Java framework or library that sends emails via SMTP.

For more information, read the SMTP Integration article.

To integrate Mailtrap using RESTful API, use the configuration available among Code samples under the API section.

API integration can be used with any Java framework or library that supports HTTP requests. For more details, refer to the API documentation.

Read more about API integration here.