New: the MailCraft MCP server is live — connect your AI agent in one line. Connect your agent →
SDKs

Java

Coming soon

Send email from Java 17+ and Spring applications.

The Java SDK isn't released yet — this page shows its planned API. You can send from Java today by calling the REST API directly.

Install

<dependency>
  <groupId>dev.mailcraft</groupId>
  <artifactId>mailcraft-java</artifactId>
  <version>0.1.0</version>
</dependency>

Send email

Send from a verified sender on one of your domains.

Main.java
MailCraft mailcraft = new MailCraft(System.getenv("MAILCRAFT_API_KEY"));

mailcraft.emails().send(SendEmailRequest.builder()
    .from("[email protected]")
    .to("[email protected]")
    .subject("Welcome!")
    .html("<p>Thanks for signing up.</p>")
    .build());

Keep your API key in the MAILCRAFT_API_KEY environment variable, never in source control. Create one under Settings → API keys, scoped to just what this app needs.

Next steps