Email in code

Create real email addresses on demand. Send and receive email in Javascript, Ruby, PHP, Python, Java, and more. Built for developers and QA testers to build email functionality and test email related processes.

Language
Example
// install package with `npm install --save mailslurp-client`
import { MailSlurp } from "mailslurp-client"

// instantiate a client with API KEY
const mailslurp = new MailSlurp({ apiKey: 'your-api-key' })

// create an inbox with a random email address ending in @mailslurp.com
const { emailAddress, id } = await mailslurp.createInbox()
expect(emailAddress).toContain("@mailslurp.com")

// for full control over inbox email addresses use a custom domain
const customInbox = await mailslurp.createInbox("test@mydomain.com")

Documentation

MailSlurp has official libraries is several popular languages. We also have an easy to use REST API that you can call from any language. If you are looking for a no-code solution try our email dashboard.

SDK Library Documentation

  • Email API

    MailSlurp javascript and typescript email library. Send and receive emails in NodeJS, React, Vue and more.

  • Email API

    MailSlurp Zapier integration. Process new emails, attachments, and contacts from MailSlurp inboxes with Zapier.

  • Email API

    Official MailSlurp Cypress JS plugin. Use real email accounts in Cypress to test user sign-up, email verification and more.

  • Email API

    Email account API REST documentation for MailSlurp. Use HTTP client to send and receive emails from email APIs.

  • Email API

    C++ MailSlurp library for embedded email processing. Email APIs for C and CPP. Send and download emails in C plus plus.

  • Email API

    Crystal lang email API for MailSlurp. Generate email accounts in Crystal code and tests. Send and receive real emails.

  • Email API

    CSharp ASP/DotNET email address library and SDK. Receive and send email from code and tests. Download emails and attachments in C#

  • Email API

    CSharp NET Standard 2.1 email address library and SDK. Receive and send email from code and tests. Download emails and attachments in C#

  • Email API

    Dart-lang email library for MailSlurp Pubspec. Dart Email API for creating email addresses in code or test that can send and receive real emails.

  • Email API

    Email API library for Deno. Send and receive email in Deno tests and apps using hosted MailSlurp mailserver API.

  • Email API

    Send and receive emails with Erlang, Elixir, and Phoenix. Official MailSlurp package on Hex.

  • Email API

    Send and receive emails in Erlang

  • Email API

    Create test email accounts in Golang. Send and receive emails in code and tests with Go and MailSlurp.

  • Email API

    Javascript email library with GraphQL types for MailSlurp API.

  • Email API

    Send and receive emails in Haskell

  • Email API

    Java mailserver library create email addresses in Kotlin, Groovy, Java and more. Send and receive emails for code and tests.

  • Email API

    Kotlin Email Library for testing and development. Create test email accounts in Java and Kotlin.

  • Email API

    Lua email API for sending and receiving emails in tests and code.

  • Email API

    Nim email API for creating test email accounts in Nim.

  • Email API

    Objective C email library for iOS and Mac. Email API for Swift and Object C mailserver.

  • Email API

    Send and receive emails in OCaml

  • Email API

    Send and receive emails in Perl with MailSlurp

  • Email API

    Create email addresses in Wordpress, Laravel, Symfony and more. Send and receive email and attachments in PHP.

  • Email API

    Send and receive emails in Powershell

  • Email API

    MailSlurp API Protobuf definitions

  • Email API

    Python Email API for MailSlurp. Send and receive emails for test email accounts in Python.

  • Email API

    Generate test email accounts in Ruby, Rspec, Cucumber and more. Send and receive emails in Rails and JRuby.

  • Email API

    Rust email API library for MailSlurp. Send, read, download emails and attachments from code or tests in Rust with this crate.

  • Email API

    Send and receive emails in Scala. Use MailSlurp test email accounts to create real inboxes in code and test apps.

  • Email API

    Swift email library. Send emails in Swift and iOS. Download emails in Swift code and tests using MailSlurp's email API.

  • Email API

    Typescript Email Library for creating test email accounts in Node without SMTP. Send and download emails in NodeJS using MailSlurps email API.

  • Email API

    Receive emails, attachments, and new recipients by webhook. Contents sent to your server via HTTP POST.

Example Code

MailSlurp has many example projects hosted on GitHub and written about in the examples section.

Tutorials

Guides

Other