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!
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