Send and Receive Emails with Ruby Mailer SDK

Effortlessly send and receive emails and attachments with MailSlurp for Ruby and Rails. Test with Rspec and Cucumber using real emails. Explore now!

  • Table of contents

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('', 2525, 'greeting.your.domain') do |smtp|
  smtp.send_message 'Hello', '', ''
Email and SMS Platform
Create a free account in 3 clicks