Project

resent

0.0
The project is in a healthy, maintained state
Resent is the official Ruby client for resent.one — a transactional email API built for product and platform teams. Install with: gem install resent (or add gem "resent" to your Gemfile). Create an API key in the Resent dashboard, set RESENT_API_KEY, then send mail with a few lines of Ruby: require "resent" resent = Resent.new(ENV.fetch("RESENT_API_KEY")) resent.emails.send( from: "Acme <noreply@yourdomain.com>", to: "you@example.com", subject: "Hello World", html: "<strong>It works!</strong>" ) Uses only Ruby stdlib (Net::HTTP + JSON) — no extra runtime gems. Supports html and/or text bodies, plus cc, bcc, and reply_to. Docs: https://developers.resent.one/sdks/ruby Dashboard: https://resent.one Source: https://github.com/resentmail/resent-ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

Send emails with Ruby — Resent

Gem version Downloads License Docs

Documentation · Website · RubyGems · GitHub

Resent Ruby SDK

The official Ruby library for Resent transactional email.

Install

gem install resent

Or add to your Gemfile:

gem "resent"
bundle install

Setup

  1. Verify a sending domain in the Resent dashboard
  2. Create an API key under Settings → API keys
  3. Store it as RESENT_API_KEY
require "resent"

resent = Resent.new(ENV.fetch("RESENT_API_KEY"))

Usage

require "resent"

resent = Resent.new(ENV.fetch("RESENT_API_KEY"))

result = resent.emails.send(
  from: "Acme <noreply@yourdomain.com>",
  to: "you@example.com",
  subject: "Hello World",
  html: "<p>Congrats on sending your <strong>first email</strong> with Resent!</p>"
)

puts result["submission_id"]

Send email using HTML

result = resent.emails.send(
  from: "Acme <noreply@yourdomain.com>",
  to: ["you@example.com"],
  subject: "Hello World",
  html: "<strong>It works!</strong>"
)

Send email using text

result = resent.emails.send(
  from: "Acme <noreply@yourdomain.com>",
  to: "you@example.com",
  subject: "Hello World",
  text: "It works!"
)

Docs

License

MIT © Resent