---
title: 6 Best Email APIs for Rails (Compared) | SendHQ
description: The best email APIs for Rails are SendHQ, Postmark, Amazon SES, Resend, Mailgun and SendGrid. Compare Action Mailer setup, Action Mailbox inbound and price.
canonical: https://sendhq.cc/blog/best-email-api-for-rails
last-updated: 2026-12-01
author: Dhrumil Barot
author_bio: Dhrumil is an email marketing expert. Dhrumil built SendHQ so developers and AI agents can send, receive and track email without fighting deliverability on their own.
published: 2026-12-01
updated: 2026-12-01
---
# 6 Best Email APIs for Rails (Compared)

By [Dhrumil Barot](https://sendhq.cc/about.md#founder), Founder

The best email APIs for Rails are SendHQ, Postmark, Amazon SES, Resend, Mailgun and SendGrid. Compare Action Mailer setup, Action Mailbox inbound and price.

Published December 1, 2026 · Updated December 1, 2026

**TL;DR:** The best email APIs for Rails are SendHQ (REST API with inbound, delivery events and a fixed $9 plan, wired in as a 25-line Action Mailer delivery method), Postmark (official postmark-rails gem and an Action Mailbox ingress), Amazon SES (cheapest at volume through aws-actionmailer-ses), Resend (a gem with both a delivery method and an inbound ingress), Mailgun (inbound routing rules) and SendGrid (enterprise scale over SMTP). Pick a provider with a gem if you want zero custom code; pick SendHQ if you want sending, replies and bounce visibility in one workspace at a fixed price.

[Create a SendHQ account](https://sendhq.cc/pricing.md) and send your first Rails email from a verified domain.

Rails sends email through Action Mailer, and `config.action_mailer.delivery_method` decides how a message leaves your app: `:smtp`, `:sendmail`, `:test`, or a provider's delivery method added by a gem ([Action Mailer guide](https://guides.rubyonrails.org/action_mailer_basics.html)). For production transactional email (password resets, receipts, sign-in links), an HTTP API delivery method beats SMTP: it returns a message ID, fails with a structured error instead of a `Net::SMTP` exception, and pairs with webhooks for bounces. For receiving, Action Mailbox ships ingresses for Mailgun, Mandrill, Postmark and SendGrid, plus a relay ingress for Exim, Postfix and Qmail ([Action Mailbox guide](https://guides.rubyonrails.org/action_mailbox_basics.html)). Below, six providers compared on how they plug into Rails, what they cost and whether they receive mail.

## How we judged Rails email APIs

- **Action Mailer integration:** an official gem with a delivery method, SMTP, or a REST API you wrap in a custom delivery method.
- **Inbound email:** a built-in or gem-provided Action Mailbox ingress, or a webhook you handle yourself.
- **Delivery events:** bounces, complaints and deliveries pushed to a signed webhook.
- **Price at 50,000 emails a month** and what happens when you go over.
- **Free tier or trial** for testing before you pay.

We did not rank on "deliverability rates": no provider publishes comparable, audited numbers, and inbox placement depends mostly on SPF, DKIM, DMARC and your list.

| Provider | Rails route | Entry paid plan | 50k emails/mo | Inbound in Rails | Free option |
| --- | --- | --- | --- | --- | --- |
| SendHQ | Custom delivery method (REST) | $9/mo, 50,000 | $9, hard cap | Webhook, every plan | None |
| Postmark | postmark-rails gem or SMTP | $15/mo, 10,000 | About $87 on Basic | Built-in Action Mailbox ingress (Pro+) | 100 emails/mo |
| Amazon SES | aws-actionmailer-ses gem or SMTP | Pay as you go | About $5 a la carte | Relay ingress or SNS | AWS credits |
| Resend | resend gem or SMTP | $20/mo, 50,000 | $20 | Ingress in the resend gem | 3,000 emails/mo |
| Mailgun | mailgun-ruby gem or SMTP | $15/mo Basic | $35 Foundation | Built-in Action Mailbox ingress | 100 emails/day |
| SendGrid | SMTP | $19.95/mo Essentials | Essentials tier | Built-in Action Mailbox ingress | 60-day trial |

![Three ways a Rails email leaves your app: SMTP, a provider gem, or a custom REST delivery method](https://cdn.sanity.io/images/l4lj7ros/production/ac93f2506326d71bbcfe19b8fbfb92d90ea0514b-1344x326.png?w=1280&auto=format)

The delivery method is the only part you change when switching provider.

## 1. SendHQ: REST API with inbound and events

SendHQ is our product: an email API for products and AI agents, sending through Amazon SES, with inbound email, hosted templates and delivery events on every plan.

- **Best for:** Rails apps that send and receive (support replies, reply-by-email) and need to see every bounce, at a fixed monthly price.
- **Rails route:** SendHQ has no gem, no SMTP relay and no Action Mailbox ingress ([SendHQ migration docs](https://sendhq.cc/docs/resend-migration.md)). You register a small delivery method that calls `POST https://sendhq.cc/api/v1/emails` with `Net::HTTP` (code below).
- **Pricing:** Starter Transactional is $9 a month for 50,000 emails and 25 verified domains; Scale is $39 a month for 200,000. There are no overage charges: past the allowance, sends are rejected with a usage-limit error ([SendHQ pricing](https://sendhq.cc/pricing.md), checked December 1, 2026).
- **Events:** signed webhooks for `email.sent`, `email.delivered`, `email.delivery_delayed`, `email.bounced`, `email.complained`, `email.failed` and `email.received`, using Standard Webhooks headers. There are no open or click events.
- **Limits:** no free plan and no free sending allowance. A new workspace's daily cap starts at 1,000 recipients and rises step by step to 50,000 after healthy sending days.

A minimal SendHQ delivery method for Action Mailer:

```
# config/initializers/sendhq_delivery.rb
require "net/http"
require "json"

class SendhqDelivery
  URL = URI("https://sendhq.cc/api/v1/emails")

  def initialize(settings)
    @api_key = settings.fetch(:api_key)
  end

  def deliver!(mail)
    payload = {
      from: mail[:from].to_s,
      to: mail.to, cc: mail.cc, bcc: mail.bcc,
      subject: mail.subject,
      reply_to: mail.reply_to,
      html: mail.html_part&.decoded,
      text: mail.text_part&.decoded || (mail.multipart? ? nil : mail.body.decoded)
    }.compact

    req = Net::HTTP::Post.new(URL, {
      "Authorization" => "Bearer #{@api_key}",
      "Content-Type" => "application/json",
      "Idempotency-Key" => mail.message_id || SecureRandom.uuid
    })
    req.body = payload.to_json
    res = Net::HTTP.start(URL.host, URL.port, use_ssl: true, read_timeout: 10) { |h| h.request(req) }
    raise "SendHQ #{res.code}: #{res.body}" unless res.is_a?(Net::HTTPSuccess)
    res
  end
end

ActionMailer::Base.add_delivery_method :sendhq, SendhqDelivery,
  api_key: ENV.fetch("SENDHQ_API_KEY")
```

```
# config/environments/production.rb
config.action_mailer.delivery_method = :sendhq
config.action_mailer.default_options = { from: "Acme <hello@mail.example.com>" }
```

The `Idempotency-Key` header makes an Active Job retry safe: the same key with an identical payload replays the stored response, and a changed payload under the same key returns 409 ([SendHQ sending docs](https://sendhq.cc/docs/sending.md)). A 429 `daily_limit_reached` is not queued, so let Active Job retry it after the reset time with `retry_on`, not in a tight loop.

## 2. Postmark

Postmark is a transactional email service that separates transactional and broadcast mail into message streams.

- **Best for:** password resets and receipts where speed and searchable logs matter more than unit price.
- **Rails route:** the official [postmark-rails gem](https://github.com/ActiveCampaign/postmark-rails), a drop-in Action Mailer delivery method (`:postmark`), and a built-in Action Mailbox ingress (`:postmark`).
- **Pricing:** free Developer plan with 100 emails a month. Basic is $15 a month for 10,000 emails plus $1.80 per extra 1,000; Pro is $16.50 ($1.30 overage) and Platform $18 ($1.20) ([Postmark pricing](https://postmarkapp.com/pricing)).
- **Limits:** inbound is on Pro and Platform only, so the Action Mailbox ingress needs one of those.

## 3. Amazon SES

Amazon Simple Email Service is AWS's sending and receiving infrastructure, billed per email.

- **Best for:** high-volume Rails apps already on AWS, with someone to run the event pipeline.
- **Rails route:** the [aws-actionmailer-ses gem](https://github.com/aws/aws-actionmailer-ses-ruby) (with `aws-sdk-rails` 5) adds `:ses` and `:ses_v2` delivery methods; SES SMTP credentials also work with `:smtp`.
- **Pricing:** a la carte outbound is $0.10 per 1,000 emails ([Amazon SES pricing](https://aws.amazon.com/ses/pricing/)).
- **Limits:** new accounts start in the SES sandbox and need production access; Rails has no SES ingress, so inbound goes through SNS or the relay ingress you wire up.

## 4. Resend

Resend is a developer-first email API with a Ruby SDK, SMTP relay and inbound email.

- **Best for:** small Rails projects that want a modern API, a usable free tier and React Email for templates.
- **Rails route:** the [resend gem](https://github.com/resend/resend-ruby) is both an Action Mailer delivery method (`:resend`) and an Action Mailbox ingress for inbound mail.
- **Pricing:** Free is 3,000 emails a month capped at 100 a day; Pro is $20 a month for 50,000, with optional overage at $0.90 per 1,000 ([Resend pricing](https://resend.com/pricing)).
- **Limits:** the 100 a day free cap only fits testing, and received email counts toward the sending quota.

## 5. Mailgun

Mailgun is an email API and SMTP service with rule-based inbound routing and address validation.

- **Best for:** Rails apps that route incoming mail by rule, such as a help desk.
- **Rails route:** the [mailgun-ruby gem](https://github.com/mailgun/mailgun-ruby) adds a `:mailgun` delivery method, and Action Mailbox has a built-in Mailgun ingress.
- **Pricing:** Free is $0 for 100 emails a day with 1 inbound route; Basic is $15 a month; Foundation is $35 a month for 50,000 ([Mailgun pricing](https://www.mailgun.com/pricing/)).
- **Limits:** log retention is short on lower plans, so store events yourself.

## 6. SendGrid: transactional plus marketing campaigns

Twilio SendGrid pairs a transactional Mail Send API with a marketing campaigns product and is aimed at large organisations that want one vendor for newsletters and app notifications.

There is no official Action Mailer delivery method. SendGrid's own [Rails guide](https://www.twilio.com/docs/sendgrid/for-developers/sending-email/rubyonrails) configures `:smtp` with the host `smtp.sendgrid.net`, port 587 and the literal user name `apikey`, with your API key as the password:

```
config.action_mailer.smtp_settings = {
  address: "smtp.sendgrid.net", port: 587,
  user_name: "apikey", password: ENV.fetch("SENDGRID_API_KEY"),
  authentication: :plain, enable_starttls_auto: true
}
```

For receiving, Action Mailbox has a built-in SendGrid ingress that accepts Inbound Parse posts. Pricing starts with a 60-day trial at 100 emails a day, then Essentials from $19.95 a month and Pro from $89.95 ([SendGrid pricing](https://www.twilio.com/en-us/products/email-api/pricing)). The trade-off for small teams is that there is no permanent free tier any more.

## Which email API works best with Rails?

For most Rails apps sending under 200,000 transactional emails a month, SendHQ gives the most for the money: $9 or $39 covers sending, inbound and delivery events, and the delivery method above is all the integration you need. Choose Postmark if you want an official gem and ingress with no code to own, Amazon SES if you send millions and have AWS skills, and Resend if you want one gem for sending and receiving with a free tier.

![Choosing a Rails email API by your main requirement](https://cdn.sanity.io/images/l4lj7ros/production/9eb75f4c3133159d2ecaf6c9c414599780b26900-1344x478.png?w=1280&auto=format)

## Should I use SMTP or an API gem in Rails?

You can use SMTP: set `config.action_mailer.smtp_settings` with `address`, `port: 587`, `user_name`, `password` and `enable_starttls_auto: true`, and every mailer works unchanged. Use an API delivery method when you want the provider's message ID, structured errors and faster sends from your job workers. SMTP is fine for a prototype; an API delivery method is better in production. Our [SMTP port guide](https://sendhq.cc/guides/smtp-port.md) covers the SMTP side.

## How do I run Rails transactional email in production?

1. Verify your sending domain with SPF, DKIM and DMARC records.
2. Set `config.action_mailer.delivery_method` to an API delivery method and read the key from credentials or the environment.
3. Call `deliver_later`, not `deliver_now`, so Active Job (Sidekiq, Solid Queue) sends outside the request.
4. Pass an idempotency key so a retried job does not send twice.
5. Receive bounce and complaint webhooks in a controller, verify the signature, and stop mailing hard-bounced addresses.

![Production path for a Rails transactional email](https://cdn.sanity.io/images/l4lj7ros/production/b49e80ef81b5061543d8329d1a664689b4de6410-1344x326.png?w=1280&auto=format)

Accepted is not delivered: wait for the event.

Our [send email with an API guide](https://sendhq.cc/guides/send-email-with-api.md), [inbound email webhooks guide](https://sendhq.cc/guides/inbound-email-webhooks.md) and [email bounce handling guide](https://sendhq.cc/guides/email-bounce-handling.md) go deeper.

## Which provider can receive replies in a Rails app?

All six receive email. Postmark, Mailgun and SendGrid have ingresses built into Action Mailbox, Resend ships one in its gem, and Amazon SES needs SNS or the relay ingress. SendHQ stores inbound mail and sends an `email.received` webhook with the email ID; your controller then fetches the message with `GET /api/v1/emails/{id}`.

Want sending, receiving and bounce events for your Rails app on one $9 plan? [Start with SendHQ](https://sendhq.cc/pricing.md).

## FAQ

### What is the best email API for Rails?

SendHQ is the best fit for Rails apps that need sending, inbound and delivery events at a fixed $9 a month, using a small custom delivery method. Postmark is the best drop-in option through its official gem, and Amazon SES is the cheapest at high volume.

### Is there a SendHQ gem for Rails?

No. SendHQ has no gem, SDK or SMTP relay, so you register a custom delivery method with `ActionMailer::Base.add_delivery_method` that posts to its REST API, as shown above.

### Which Rails email API has a free plan?

Resend (3,000 emails a month, 100 a day), Mailgun (100 a day) and Postmark (100 a month) have free plans. SendGrid offers a 60-day trial, Amazon SES gives AWS credits, and SendHQ has no free plan.

### How do I test Rails email without sending real mail?

Use `config.action_mailer.delivery_method = :test` in tests, which collects messages in `ActionMailer::Base.deliveries`, and mailer previews or `letter_opener` in development.

### Can I switch email providers in Rails without changing code?

Mostly yes. Mailers stay the same; you change `delivery_method` and the credentials. Webhook controllers and Action Mailbox ingress settings are provider-specific and need updating.

## Related articles

[6 Best Email APIs for Django (Compared)](https://sendhq.cc/blog/best-email-api-for-django) [6 Best Email APIs for Laravel (Compared)](https://sendhq.cc/blog/best-email-api-for-laravel) [Transactional Email API Cost per 100k Emails (Compared)](https://sendhq.cc/blog/transactional-email-api-cost-100k-emails)
