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 lets you use real email in code and tests without need for SMTP mail servers.Fo

For docs see the JavaDoc website.

Installation

You can install MailSlurp's email library from maven central.

Gradle build file

Maven pom file

Example usage

A basic usage of MailSlurp is to create a disposable test email account for testing. First configure your client with an API key that you can obtain from the MailSlurp dashboard.

Configure client

Import the MailSlurp package and configure the API key.

Create an email account in Java

Use the inbox controller to create new inboxes:

Get started