MailSlurp
MailSlurp
Pricing
Sign inSign up
  1. Home
  2. guides

How-to guides

Learn how MailSlurp works and how you can use it to achieve email related tasks in code, tests, or online.

For developer references see the API documentation or the example code projects.

Recommended

Introduction to MailSlurp

Introduction to MailSlurp

Install and configure MailSlurp using SDK libraries or REST API. Create phone numbers and email accounts and control them in code and tests.

Creating inboxes

Creating inboxes

How to create email addresses. Control mailboxes with MailSlurp to send and receive emails.

Send and receive emails

Send and receive emails

Use inbound and outbound email in code, mail-clients, or online dashboard. Add attachments, configure webhooks and gain SMTP access.

Featured

Introduction to MailSlurp

Introduction to MailSlurp

Install and configure MailSlurp using SDK libraries or REST API. Create phone numbers and email accounts and control them in code and tests.

Creating inboxes

Creating inboxes

How to create email addresses. Control mailboxes with MailSlurp to send and receive emails.

Wait for matching email content

Wait for matching email content

How to wait for email messages in code that match search criteria. Pattern matching and regular expression examples.

Testing User Sign-Up and Email Confirmation

Testing User Sign-Up and Email Confirmation

A tutorial on testing email dependant actions using MailSlurp test email accounts. Intercept inbound emails in tests and extract confirmation codes.

Testing SMS based authentication (2FA/OTP)

Testing SMS based authentication (2FA/OTP)

How to test applications that use two-factor (2FA) authentication and one-time TXT/SMS message passwords and codes.

Team share email accounts

Team share email accounts

How to manage MailSlurp team access to an organization. Create custom company mailservers, email routing, and forwarding. Configure member permissions.

Sending emails in code and tests

Sending emails in code and tests

How to send emails in code and tests. Use MailSlurp email APIs in Javascript, Java, PHP, CSharp and more. Works with SMTP clients or REST SDKs.

SMTP IMAP Mail Settings

SMTP IMAP Mail Settings

How to access MailSlurp email accounts using IMAP and SMTP servers. Configure your mail clients or programming SDKs to use SMTP protocols.

Receive emails and attachments with Webhook Push

Receive emails and attachments with Webhook Push

Receive emails with http webhooks. Webhooks let you respond to inbound email streams in real time on your server or within an application.

OTP one time password email testing

OTP one time password email testing

How to test MFA 2FA short-codes and login magic links. Integration testing using throwaway email accounts. Dummy mailbox server to capture codes.

Inbox rules: permissions and routing (allow, block, filter)

Inbox rules: permissions and routing (allow, block, filter)

Set inbox routing rules to block or allow inbound and outbound emails. Employ recipient patterns to filter mail.

How to configure Mail desktop clients with MailSlurp

How to configure Mail desktop clients with MailSlurp

How to setup MailSlurp with Outlook, Gmail, Thunderbird, Mail app and more.

Email verification: checking a list of email addresses to reduce bounces

Email verification: checking a list of email addresses to reduce bounces

Avoid bounces and deliver emails to your customers with email verification and validation.

Email tracking pixels

Email tracking pixels

See if emails are opened by sending tracking pixels. Receive open events via Webhook or view which recipients opened an email in the MailSlurp dashboard

Email auto-forwarding rules

Email auto-forwarding rules

Create email forwarding rules for inbound emails to reroute messages.

Email address custom domain setup - (step by step guide)

Email address custom domain setup - (step by step guide)

Custom email account domain setup. Attach your hosting to MailSlurp mailservers using DNS records. Add DKIM for identity.

CSharp send SMTP email

CSharp send SMTP email

How to use CSharp (C#) and .NET SMTP client to send email with MailSlurp mail server. Use System.Net.Mail to compose and download emails

Attachments

Attachments

Send and receive email attachments. How to attach files to SMTP emails.

Receiving and reading emails

Receiving and reading emails

How to fetch and view emails with mail clients, code, or tests. Download attachments and view HTML previews using webhooks, REST, or SMTP.

Email Aliases

Email Aliases

Email forwarding API for automatic email proxy. Setup auto-forwarding email aliases to mask a real email address.

Account setup and usage

Account setup and usage

Sign-up and login. How to manage your email settings, account plan, and team access. Change settings in MailSlurp.

Extract email content

Extract email content

How to match email content and use regex or server side matching to extract patterns. Capture links and verification codes from emails.

Other

MailSlurp Examples

Developer example projects and guides are available in many languages and frameworks.

What is an SMTP Server?

How do SMTP servers work and what is a fake smtp server

What are SMTP mail ports

SMTP protocol uses several common ports to send and receive email messages. This post compares conventional ports and SSL support.

What are NBSP HTML Entities

NBSP non-breaking space use in email and HTML padding. Add   entities to your email to give consistent formatting.

What are DKIM records

What is Dmarc and DKIM and how to reduce email spam with DNS records. Email reputation and bounce rates are important for sender reputation.

What Is The Best SMTP Port To Use?

MailServers use TCP ports to transmit emails. Picking the right port between 25 vs 2555, 465 vs 587 in SMTP is easy with this guide.

Wait for emails - receive inbound emails in code

Fetch emails and attachments in code by waiting for new emails to arrive. MailSlurp waitFor methods provide automatic long-polling.

Transactional Email API Fundamentals

How to send email campaigns and transactional marketing emails using email API services like MailSlurp. Reduce bounces and increase deliverability.

Testing webhook responses

Webhook pub/sub messaging allows the processing of inbound messages at scale. Testing your webhook handler is important for end-to-end integrations.

Testing user sign-up (for integration and QA testers)

Use MailSlurp's Playground to test ideas or integrations with a real user sign-up, verification, and login process.

Testing email with Cypress test email accounts

Test email accounts for CypressJS. End-to-end testing with real email addresses using MailSlurp Cypress plugin.

Test email address accounts

Create a free test email address for testing emails online with web dashboard or REST API. Test SMTP relay, email notifications and more.

Team email account sharing - manage team access to emails and inboxes

Manage team access to email inboxes within an organization. Create custom mailboxes and grant access to emails within a team.

Single sign-on guides

How to setup SAML SSO for MailSlurp using your favourite identity provider.

Sending email with telnet

How to send email with telnet mail commands from the terminal. Use the telnet protocol to interact with SMTP mail servers.

Send Transactional Emails in Code or End-to-End Tests.

How to send emails using the Dashboard, API, or SDK clients. Free SMTP mailservers and email accounts to send transactional mail.

Schedule email sending for recurring mail

How to send emails at a specific time or delay sending with email scheduling tools. Plan your mail campaigns and custom sending times.

SMTP vs HTTP MailSlurp inboxes

The difference between HTTP and SMTP inboxes and domains in MailSlurp API. How to configure custom email addresses online.

SMTP Relay for outbound smtp servers

How to use SMTP relay to address spam and security issues that affect outbound mail servers. Setup mail forwarding with SMTP relay.

Reset MailSlurp API Keys

Reset your account API access keys. Secure your applications by rotating passwords and keys in MailSlurp regularly.

Receive inbound SMS TXT messages with API and webhooks

How to create phone numbers and read text messages in code and tests. Receive inbound SMS in via webhook or fetch.

Receive emails in code and tests

How to fetch and parse emails and attachments in tests or code using MailSlurp email APIs, SMTP libraries, GraphQL and more.

Querying IP addresses

Free IP Address lookup API. Find the IP address of a domain and or URL with internet protocol reverse DNS lookup.

Prevent spam with test emails

Every email service provider, such as Google's Gmail, has a unique spam filter, which means that your test emails must be thorough.

Plans and pricing options

Manage payments, team access, and usage limits. How to upgrade, alter your subscription plan, and view invoices.

PHP Mail Tutorial (3 ways to send emails)

How to send and receive emails in PHP. Access email in PHP without an SMTP server. PHP SDK for email testing and development.

Managing SAML SSO access to MailSlurp organizations

Setup team enterprise access using identity providers such as AD, Okta, OneLogin and more. Secure email account sharing with MFA.

Mailto link use in HTML

How do mailto HTML hrefs work? Let's configure anchor links for email sending with custom subject line and body.

MailSlurp Send Limits

How to manage sending limits and prevent spam warnings. Maintain a healthy sender reputation and improve delivery.

MailSlurp SMTP Pop3 IMAP port settings

How to configure and test SMTP, POP3, and IMAP inboxes using MailSlurp email APIs. Port 25, 465, 1143 and more.

MailSlurp NodeMailer SMTP Usage

Use SMTP nodemailer with MailSlurp disposable email addresses. Configure SMTP client access to mailslurp inboxes.

Install Python packages from PyPi using Conda

Use Conda to manage python environments without virtualenv. How to setup and install conda packages using Pip.

How to test 2FA OTP login using SMS codes with Playwright

The ultimate guide to testing OAuth one-time-password flows with real SMS MFA. Authentication tests with programmable TXT message APIs.

How to send encrypted emails

How MailSlurp secures your emails and what security features are available. Built on modern and safe cloud infrastructure.

How to send emails in VBA

Send email in Visual basic. VBA scripting has built in mailing functionality. Use SMTPClient to send mail and attachments.

How to handle rate-limit exception in MailSlurp

A guide to reduce rate-limit exceptions when using HTTP APIs

How to fetch email message and attachments in code

How to read emails and attachments in applications, tests, or the MailSlurp dashboard. Fetch SMTP messages body parts, headers, and files.

How to create email templates for transactional emails

Use email templates with variable replacement for sending email campaigns with personalized messages. Email templating tutorial.

How to configure email subdomains for custom servers

How to manage email subdomain custom mailboxes using SMTP/IMAP mailserver settings.

How to choose the perfect SMTP port

587 vs 465 vs 25 vs 2525 - which port is the right one for SMTP mailservers?

How To Test Emails Before You Send

There are many free tools to test emails before sending. This can help prevent spam warnings and increase deliverability.

GraphQL email mail API

Fetch and read emails with Graph-QL mail APIs. Control and inbox using MailSlurp and Graph query language instead of SMTP protocol.

Free email testing guide

How to test emails before sending using email testing APIs like MailSlurp

Free email testing guide

How to test emails before sending using email testing APIs like MailSlurp

Forward SMS text messages to code and tests via Webhooks or HTTP

Create real phone numbers to handle inbound SMS messages. Direct TXT to your application or test suites. Process SMS two-factor authentication flows.

Fetching emails in code

How to receive email in Javascript, Jest, CypressJS and Node. Download and read SMTP messages using MailSlurp REST API clients.

Expired email addresses

Create auto expiring inboxes using MailSlurp disposable mailboxes. Email accounts that expire and self destruct.

Email wildcard catch-all for custom domains

MailSlurp custom email address guide for catch all email routing.

Email size limits

Email size limits

Email read (opened seen settings)

How to control the seen or read settings for an email using MailSlurp.

Email for testing (test email accounts)

Use dummy test email accounts to test email end-to-end.

Email address verification

Check email addresses are real and exist using MailSlurp email verification.

Difference between IMAP POP3 and SMTP

IMAP, SMTP, POP3 email protocols compared. Which to use for sending and receiving mail and attachments at scale.

Deno Email Apis

Send and receive emails in Deno JS. Use APIs in Deno with MailSlurp.

Dashboard guides

Email dashboards for testing and development

DNS Lookup Nameservers

Use MailSlurp to fetch name server records. These are useful for verifying domains and querying mail servers.

DMARC – All Facts that you should know

DMARC – All Facts that you should know

Creating custom domains

How to use custom domains with MailSlurp. Create email addresses with your own domain and send and receive email from tests, apps, or the web app.

Create email accounts on demand

Use MailSlurp to create real email addresses on demand. Generate test email accounts or create permanent user email addresses when and where you need them.

CSharp Email Tutorial

SMTP mailserver testing and usage in CSharp using

Batch API requests

How to exceed recipient limits by sending emails in batches

Base64 file uploads

How to encode files as Base 64 encoded strings in several languages

BCC and CC in SMTP emails

What is cc and bcc in email? What is the difference between cc and bcc?

BCC For Email: What It Means And When To Use It

What is BCC email field (blind carbon copy) and how does it differ to CC?

Avoiding email spam filters

How to send emails that don't trigger a spam warning.

Avoid email bounces and improve reputation

Setup bounce notification webhooks for your account to reduce email bounces. Respond to bounce events by saving bounce recipients.

API Key (how to configure MailSlurp)

Use your api access token to call the MailSlurp API and control your inboxes remotely.

A guide to PHP Mailer

PHPMailer compose mail tutorial. Send email with PHP and composer packages instead of the inbuilt mail commands.

Wait for emails

How MailSlurp waitFor methods work to hold a connection until matching emails arrive. Email matching guide for REST API.

Using Attachments

Use MailSlurp's attachment endpoints to upload, send, receive, and download attachments.

Email analysis (spam and virus detection)

Analyse emails for vulnerabilities and viruses. Get DMARC, SPF, and DKIM verdicts for emails with MailSlurp. Reduce spam and improve delivery.

Email Forms

Submit forms directly to email. No code or sign-up required. Embed HTML forms that submit results to your email address.

Account settings

Send and receive using test email accounts (in 3 easy steps). Disposable and permanent mailservers with custom domains.

API Reference

Build powerful applications and test suites using real email addresses in code. Create inboxes on demand then send and receive emails and attachments in Javascript, Go, PHP, Ruby, Java, C#, REST and more.

Footer

Features

  • Unlimited email addresses
  • Sending emails
  • Receiving emails
  • Email validation
  • Zapier email automation
  • Email webhooks
  • Inbox rulesets
  • SMTP/IMAP access
  • SMTP libraries
  • Team SSO mailboxes
  • Custom domains
  • Email dashboards
  • Email open tracking
  • Email testing guides

Documentation

  • Developer documentation
  • Example GitHub repositories
  • Postman Collection
  • REST API
  • IMAP / SMTP
  • GraphQL API
  • Javascript library
  • CSharp Nuget
  • Java Package
  • PHP library
  • Ruby Gem
  • Python package
  • Golang library
  • Additional integrations

Examples

  • Getting started guide
  • CypressJS email testing
  • Selenium email plugin
  • Cucumber RSpec testing
  • Robot Framework
  • Jest Puppeteer integration
  • PHPUnit and codeception
  • NodeMailer SMTP setup
  • Disposable email accounts
  • .NET Specflow testing
  • iOS email libraries
  • Email testing guide
  • Documentation

About

  • Dashboard
  • Pricing
  • Blog
  • Support
  • Company
  • Terms
  • Privacy
  • API Status
  • Swagger UI
  • OpenAPI Spec
  • Alternatives
  • Sitemap
  • Contact
  • Login
  • Sign Up
MediumTwitterGitHubMail

© 2023 Pettman OU: Tule põik 1, Saue, 76505, Harjumaa, Estonia. All rights reserved.