Send emails with Ruby

Integrate with any Ruby application

Either you're building a web app with Ruby on Rails or a RESTful API with Sinatra, Resend seamlessly integrate into your stack.

require "resend"
Resend.api_key = "re_123456789"
params = {
"from": "onboarding@resend.dev",
"to": "delivered@resend.dev",
"subject": "Hello World",
"html": "<strong>it works!</strong>"
}
sent = Resend::Emails.send(params)
puts sent
# Add this to config/initializers/mailer.rb:
Resend.api_key = "re_123456789"
# Add this to config/environments/environment.rb:
config.action_mailer.delivery_method = :resend
# Send the email
class UserMailer < ApplicationMailer
default from: 'onboarding@resend.dev'
def welcome_email
@user = params[:user]
@url = 'http://example.com/login'
mail(to: ["delivered@resend.dev"], subject: 'Hello World')
end
end

Trigger emails using Ruby on Rails

Configure Resend as an Action Mailer delivery method and send emails from your application using ERB templates.

Add email to your Sinatra web app

Install by adding the resend gem to your list of dependencies, include the API key, and you're ready to start sending emails.

require "sinatra"
require "resend"
set :port, 5000
set :bind, "0.0.0.0"
Resend.api_key = 're_123456789'
get "/" do
content_type :json
params = {
from: 'onboarding@resend.dev',
to: 'delivered@resend.dev',
subject: 'Hello World',
html: '<strong>it works!</strong>',
}
Resend::Emails.send(params).to_hash.to_json
end

All you need to get started

Resources to help you integrate email into your application quickly.

Ruby Quickstart

Follow the step-by-step guide and learn how to send your first email using Ruby.

Ruby Example

Clone the example repository to get started quickly with Resend using Ruby.

API Reference

Understand the REST API endpoints and each of the parameters that can be used.

  • "Our team loves Resend. It makes email sending so easy and reliable. After we switched to Dedicated IPs, our deliverability improved tremendously and we don't hear complaints about emails landing on spam anymore."
    Vlad MatsiiakoVlad Matsiiako
    Vlad Matsiiako
    Vlad MatsiiakoCo-founder of Infisical
  • "I've used Mailgun, Sendgrid, and Mandrill and they don't come close to providing the quality of developer experience you get with Resend."
    Brandon StrittmatterBrandon Strittmatter
    Brandon Strittmatter
    Brandon StrittmatterCo-founder of Outerbase
  • "Resend is an amazing product. It was so easy to switch over. I feel confident knowing that our important emails are in good hands with Resend. Everyone should be using this."
    Shariar KabirShariar Kabir
    Shariar Kabir
    Shariar KabirFounder at Ruby Card
  • "All of our customers are located in South America, so having a solution that could send emails from the region closest to our users is very important. Resend's multi-region feature is a game-changer for us."
    Giovanni KeppelenGiovanni Keppelen
    Giovanni Keppelen
    Giovanni KeppelenCTO & Partner at VOA Hoteis
  • "The speed and ease of integrating with the product was incredible, but what really stood out was their intricate knowledge of email and relentless support day or night. Oh and we also ended up winning Product of the week."
    Sam DuckerSam Ducker
    Sam Ducker
    Sam DuckerCo-founder of Anyone
  • "As a developer I love the approach that the Resend team is taking. Its so refreshing. They are also extremely user-centric and helpful in terms of getting you up and running, sending beautiful emails that deliver."
    Hahnbee LeeHahnbee Lee
    Hahnbee Lee
    Hahnbee LeeCo-Founder at Mintlify
  • "The Resend team have built a great product in a space that hasn't seen 10x innovation for years. Engineering peers are raving about Resend - it's such a smoother dev experience."
    Roberto RiccioRoberto Riccio
    Roberto Riccio
    Roberto RiccioHead of Product at Alliance
  • "If you're a developer or working on a startup, you're going to love Resend's approach to emailing."
    Joe DeMariaJoe DeMaria
    Joe DeMaria
    Joe DeMariaCo-founder & CEO of SpecCheck
  • "We were up and running with Resend in no time. It was seamless to integrate into our existing workflow and gave us a tremendous amount of visibility into our email capabilities. Simple to say, it was a no-brainer."
    Ty SharpTy Sharp
    Ty Sharp
    Ty SharpCo-founder & CEO of InBuild
  • "Resend not only streamlines our emails to accommodate our expanding customer base, but their team also offered valuable hands-on support during the transition from our old API. Their product is visually stunning and seamlessly integrates with React Email."
    Thiago CostaThiago Costa
    Thiago Costa
    Thiago CostaCo-founder of Fey and Narative
  • "As of our last deployment all of our emails are using Resend. We are loving the development experience of React Email - not having to leave my dev environment to develop new emails is a game-changer."
    Adam RankinAdam Rankin
    Adam Rankin
    Adam RankinFounding Engineer at Warp
  • "Working with Resend has been amazing. By using Webhooks, I'm able to track email opened/clicked events via Segment and log those events in LogSnag for visibility. I highly believe in the people behind Resend."
    Taylor FacenTaylor Facen
    Taylor Facen
    Taylor FacenFounder of Finta
  • "Resend is super easy to set up. Loving the modern approach the team is taking with supercharging email. Never been a fan of other clunky tools."
    Brek GoinBrek Goin
    Brek Goin
    Brek GoinFounder of Hammr
  • "Our team loves Resend. It makes email sending so easy and reliable. After we switched to Dedicated IPs, our deliverability improved tremendously and we don't hear complaints about emails landing on spam anymore."
    Vlad MatsiiakoVlad Matsiiako
    Vlad Matsiiako
    Vlad MatsiiakoCo-founder of Infisical
  • "I've used Mailgun, Sendgrid, and Mandrill and they don't come close to providing the quality of developer experience you get with Resend."
    Brandon StrittmatterBrandon Strittmatter
    Brandon Strittmatter
    Brandon StrittmatterCo-founder of Outerbase
  • "Resend is an amazing product. It was so easy to switch over. I feel confident knowing that our important emails are in good hands with Resend. Everyone should be using this."
    Shariar KabirShariar Kabir
    Shariar Kabir
    Shariar KabirFounder at Ruby Card
  • "All of our customers are located in South America, so having a solution that could send emails from the region closest to our users is very important. Resend's multi-region feature is a game-changer for us."
    Giovanni KeppelenGiovanni Keppelen
    Giovanni Keppelen
    Giovanni KeppelenCTO & Partner at VOA Hoteis
  • "The speed and ease of integrating with the product was incredible, but what really stood out was their intricate knowledge of email and relentless support day or night. Oh and we also ended up winning Product of the week."
    Sam DuckerSam Ducker
    Sam Ducker
    Sam DuckerCo-founder of Anyone
  • "As a developer I love the approach that the Resend team is taking. Its so refreshing. They are also extremely user-centric and helpful in terms of getting you up and running, sending beautiful emails that deliver."
    Hahnbee LeeHahnbee Lee
    Hahnbee Lee
    Hahnbee LeeCo-Founder at Mintlify
  • "The Resend team have built a great product in a space that hasn't seen 10x innovation for years. Engineering peers are raving about Resend - it's such a smoother dev experience."
    Roberto RiccioRoberto Riccio
    Roberto Riccio
    Roberto RiccioHead of Product at Alliance
  • "If you're a developer or working on a startup, you're going to love Resend's approach to emailing."
    Joe DeMariaJoe DeMaria
    Joe DeMaria
    Joe DeMariaCo-founder & CEO of SpecCheck
  • "We were up and running with Resend in no time. It was seamless to integrate into our existing workflow and gave us a tremendous amount of visibility into our email capabilities. Simple to say, it was a no-brainer."
    Ty SharpTy Sharp
    Ty Sharp
    Ty SharpCo-founder & CEO of InBuild
  • "Resend not only streamlines our emails to accommodate our expanding customer base, but their team also offered valuable hands-on support during the transition from our old API. Their product is visually stunning and seamlessly integrates with React Email."
    Thiago CostaThiago Costa
    Thiago Costa
    Thiago CostaCo-founder of Fey and Narative
  • "As of our last deployment all of our emails are using Resend. We are loving the development experience of React Email - not having to leave my dev environment to develop new emails is a game-changer."
    Adam RankinAdam Rankin
    Adam Rankin
    Adam RankinFounding Engineer at Warp
  • "Working with Resend has been amazing. By using Webhooks, I'm able to track email opened/clicked events via Segment and log those events in LogSnag for visibility. I highly believe in the people behind Resend."
    Taylor FacenTaylor Facen
    Taylor Facen
    Taylor FacenFounder of Finta
  • "Resend is super easy to set up. Loving the modern approach the team is taking with supercharging email. Never been a fan of other clunky tools."
    Brek GoinBrek Goin
    Brek Goin
    Brek GoinFounder of Hammr
  • "Our team loves Resend. It makes email sending so easy and reliable. After we switched to Dedicated IPs, our deliverability improved tremendously and we don't hear complaints about emails landing on spam anymore."
    Vlad MatsiiakoVlad Matsiiako
    Vlad Matsiiako
    Vlad MatsiiakoCo-founder of Infisical
  • "I've used Mailgun, Sendgrid, and Mandrill and they don't come close to providing the quality of developer experience you get with Resend."
    Brandon StrittmatterBrandon Strittmatter
    Brandon Strittmatter
    Brandon StrittmatterCo-founder of Outerbase
  • "Resend is an amazing product. It was so easy to switch over. I feel confident knowing that our important emails are in good hands with Resend. Everyone should be using this."
    Shariar KabirShariar Kabir
    Shariar Kabir
    Shariar KabirFounder at Ruby Card
  • "All of our customers are located in South America, so having a solution that could send emails from the region closest to our users is very important. Resend's multi-region feature is a game-changer for us."
    Giovanni KeppelenGiovanni Keppelen
    Giovanni Keppelen
    Giovanni KeppelenCTO & Partner at VOA Hoteis
  • "The speed and ease of integrating with the product was incredible, but what really stood out was their intricate knowledge of email and relentless support day or night. Oh and we also ended up winning Product of the week."
    Sam DuckerSam Ducker
    Sam Ducker
    Sam DuckerCo-founder of Anyone
  • "As a developer I love the approach that the Resend team is taking. Its so refreshing. They are also extremely user-centric and helpful in terms of getting you up and running, sending beautiful emails that deliver."
    Hahnbee LeeHahnbee Lee
    Hahnbee Lee
    Hahnbee LeeCo-Founder at Mintlify
  • "The Resend team have built a great product in a space that hasn't seen 10x innovation for years. Engineering peers are raving about Resend - it's such a smoother dev experience."
    Roberto RiccioRoberto Riccio
    Roberto Riccio
    Roberto RiccioHead of Product at Alliance
  • "If you're a developer or working on a startup, you're going to love Resend's approach to emailing."
    Joe DeMariaJoe DeMaria
    Joe DeMaria
    Joe DeMariaCo-founder & CEO of SpecCheck
  • "We were up and running with Resend in no time. It was seamless to integrate into our existing workflow and gave us a tremendous amount of visibility into our email capabilities. Simple to say, it was a no-brainer."
    Ty SharpTy Sharp
    Ty Sharp
    Ty SharpCo-founder & CEO of InBuild
  • "Resend not only streamlines our emails to accommodate our expanding customer base, but their team also offered valuable hands-on support during the transition from our old API. Their product is visually stunning and seamlessly integrates with React Email."
    Thiago CostaThiago Costa
    Thiago Costa
    Thiago CostaCo-founder of Fey and Narative
  • "As of our last deployment all of our emails are using Resend. We are loving the development experience of React Email - not having to leave my dev environment to develop new emails is a game-changer."
    Adam RankinAdam Rankin
    Adam Rankin
    Adam RankinFounding Engineer at Warp
  • "Working with Resend has been amazing. By using Webhooks, I'm able to track email opened/clicked events via Segment and log those events in LogSnag for visibility. I highly believe in the people behind Resend."
    Taylor FacenTaylor Facen
    Taylor Facen
    Taylor FacenFounder of Finta
  • "Resend is super easy to set up. Loving the modern approach the team is taking with supercharging email. Never been a fan of other clunky tools."
    Brek GoinBrek Goin
    Brek Goin
    Brek GoinFounder of Hammr

Start sending tonight

Resend delivers mission-critical emails for some of the fastest growing teams.

Sign up for free