Send transactional emails from your Ruby on Rails application using Unosend. Integrate with Action Mailer or use the REST API directly for reliable email delivery.
Everything you need to send emails from Ruby on Rails
Action Mailer compatible
ERB template support
Active Job async delivery
Webhook event handling
Rails credentials integration
Get up and running in minutes with this code example
# app/mailers/user_mailer.rb
class UserMailer < ApplicationMailer
def welcome_email(user)
@user = user
# Uses Unosend SMTP or API adapter
mail(
to: @user.email,
subject: "Welcome to Our App!"
)
end
end
# Or use the REST API directly
require 'net/http'
require 'json'
uri = URI('https://api.unosend.co/v1/emails')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV['UNOSEND_API_KEY']}"
request['Content-Type'] = 'application/json'
request.body = { from: 'hello@yourdomain.com', to: email, subject: subject, html: body }.to_json
response = http.request(request)Follow these steps to integrate Unosend with Ruby on Rails
Add your UNOSEND_API_KEY to Rails credentials or environment
Configure Action Mailer with Unosend SMTP settings
Or create a custom delivery method using the REST API
Create mailer classes as usual
Send emails using deliver_now or deliver_later
Works with existing Action Mailer setup
Async delivery with Active Job
Better deliverability than Sendmail
Email open and click tracking
More framework integrations you might like
Send transactional emails from your Next.js application using Unosend. Works with App Router, API routes, and Server Actions.
Build beautiful email templates with React components and send them with Unosend. Use JSX to create responsive HTML emails.
Send emails from Node.js with our official SDK. Support for Express, Fastify, NestJS, and any Node.js application.
Start sending emails from Ruby on Rails in under 5 minutes. Free tier includes 5,000 emails/month.