Java email client: send and receive emails and attachments in Java, Kotlin and more

Create email addresses in Java using MailSlurp’s official JVM SDK. Send and receive emails and attachments in Java, Kotlin, Groovy, Clojure and other JVM languages. MailSlurp let’s you use real email in code and tests without need for SMTP mail servers.

Code samples

Example
Language
// create an inbox using the inbox controller
InboxControllerApi inboxControllerApi = new InboxControllerApi(defaultClient);
Inbox inbox = inboxControllerApi.createInbox(null, null, null, null, null, null);

// verify inbox
assertEquals(inbox.getEmailAddress().contains("@mailslurp.com"), true);
assertNotNull(inbox.getId())

Get started