Ruby Mailer SDK - send and receive emails in Rails, Rspec and more using MailSlurp's official email Gem

Receive email and attachments with Rails, Rspec, and Ruby without SMTP using MailSlurp Ruby Gem.

Create email accounts in code and tests, send and receive emails and attachments in Ruby and Rails. Simple and powerful email APIs with examples and integrations for many frameworks. Test your applications using real emails with Cucumber and Rspec.

Get started

Examples of sending email in Ruby

First require the standard smtp library

require 'net/smtp'

Configure the ruby service to use the MailSlurp SMTP server:

Net::SMTP.start('mx.mailslurp.com', 2525, 'greeting.your.domain') do |smtp|
  smtp.send_message 'Hello', 'from@me.com', 'to@you.com'
end

Related content

CSharp Email API and SMTP library

Receive email in DotNET Core using C# and MailSlurp

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.

Official MailSlurp documentation

Developer documentation and guides for MailSlurp's email APIs. REST, SDKS, Graphql, SMTP and more. MailSlurp is an email and SMS API service for develop

Golang email library for sending and reading emails

Golang Email Library for sending and receiving emails in Go over SMTP or HTTP/S.

PHP

PHP email API for creating inboxes, sending email, and receiving attachments in code and tests.

Ruby Mailer SDK - send and receive emails in Rails, Rspec and more using MailSlurp's official email Gem

Receive email and attachments with Rails, Rspec, and Ruby without SMTP using MailSlurp Ruby Gem.

Temporary email api

Temporary email API for disposable email accounts. Free for personal use with REST API and clients in NodeJS, CSharp and more.

Mailinator alternative

Alternatives to Mailinator for test email accounts. Create real email addresses using MailSlurp

Generate API clients using Swagger

How to create SDK libraries a language of your choice

Python Robot Framework email test

Python automation email testing Robotframework plugin

Testing authentication using real email addresses in Ruby with Capybara, Cucumber, and Selenium

Cucumber example project using Capybara to test user authentication using real email addresses.

Send email with Axios JS (and receive email too!)

Send email in Javascript with MailSlurp email API

Cucumber, Ruby

Generate test email accounts with Ruby and Cucumber. Test email sign-up, password verification and more.

Using Attachments

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

GraphQL Email API

Fetch and read emails with GraphQL inboxes using MailSlurp email API.

Ruby send SMTP email

How to use Ruby SMTP client to send email with the MailSlurp mail servers

Using custom domains with MailSlurp

Email custom domains with API access

Create email inboxes using MailSlurp's API

Create email inboxes using MailSlurp's API

MailSlurp API entities and how to use them

MailSlurp API entities and how to use them

Get emails from code (how to receive emails programmatically)

How to receive emails directly in code, applications, and tests. Use MailSlurp to send and receive SMTP emails.

Sending email in Javascript and NodeJS (Typescript examples)

Sending email in Javascript and NodeJS (Typescript examples)

Ready to dive in?Start building email applications today.