Java

Official MailsSetu Java SDK. Works with Java 11+ for email, inbound workflows, and webhooks.

Installation (Maven)

xml
<dependency>
    <groupId>in.mailsetu</groupId>
    <artifactId>mailsetu-java</artifactId>
    <version>0.2.6</version>
</dependency>

Installation (Gradle)

groovy
implementation 'in.mailsetu:mailsetu-java:0.2.6'

Send an email

java
import in.mailsetu.MailSetu;
import java.util.List;
import java.util.Map;

MailSetu client = new MailSetu(System.getenv("MAILSETU_API_KEY"));

String response = client.emails().send(Map.of(
    "from", "Acme <noreply@acme.co>",
    "to", List.of("user@example.com"),
    "subject", "Welcome to Acme!",
    "html", "<h1>Welcome!</h1>"
));
System.out.println(response);