Integrations

Ruby

Official Ruby client to send emails and manage contacts, templates, and more.

How it works

Integrate Mailtrap email platform directly into your Ruby project using our official gem. Add sending capabilities for transactional and bulk emails, and manage your domains, contacts, templates, and account.

Configure

Step 1: Create a Mailtrap account and verify your domain. 

Step 2: Install Mailtrap with a $ gem install mailtrap command. 

Step 3: Send emails, below you’ll find a Ruby on Rails example.

# place this code in config/environments/production.rb:
config.action_mailer.delivery_method = :mailtrap

# then set the MAILTRAP_API_KEY environment variable
# using your hosting solution.

For more details and examples, check the official GitHub repo

Supported functionality

  • Email sending – transitional and bulk 
  • Batch sending
  • Contacts and contacts lists management
  • Templates management 
  • Sending domains management
  • Sending and getting sandbox emails
  • Managing sandbox projects