Comparisons

SendGrid processed vs delivered events in Rails Action Mailer

In SendGrid, "processed" means SendGrid accepted and queued your message; "delivered" means the recipient's mail server accepted it. If 97 of 100 Rails emails show up, the other 3 were usually dropped, bounced, or raised an error your app never surfaced. Log errors, enable dropped and bounce events, and match by custom argument.

Sohail HussainSohail Hussain10 min read

Short answer

  • Processed means SendGrid accepted your message and queued it. Delivered means the recipient's mail server accepted it from SendGrid. Neither one says the email reached the inbox.
  • If 97 of 100 sends appear in your webhook, the other 3 were most likely dropped by SendGrid, rejected before SendGrid accepted them, or hidden because your webhook is not subscribed to dropped and bounce events.
  • Subscribe to every event type, use deliver_now! while debugging so SMTP errors raise, and tag each message with your own ID so you can match events to records.

You sent 100 emails from Action Mailer through SendGrid SMTP, and your webhook shows only 97 of them. Or the dashboard says "processed" and you are not sure whether that means the person got the message. This page compares the event types, explains where the missing messages usually go, and shows how to log and match every send.

How the events compare

Treat each event as the answer to one question. None of them says "the email reached the inbox"; no SendGrid event can say that.

EventWhat it tells youWhat it does not tell you
processedSendGrid received the message and queued it for sendingThat any recipient server has seen it
droppedSendGrid decided not to send it (invalid address, or an address on a suppression list)Anything about the recipient's server; it never got that far
deferredThe recipient server temporarily refused it; SendGrid will retryThe final outcome; wait for a later delivered or bounce
deliveredThe recipient's server accepted the messageInbox versus spam folder
bounceThe recipient's server permanently rejected itWhether the address is fixable; read the reason text

Use delivered as your "the recipient's server took it" signal. Use processed only to confirm SendGrid has your message. Treat dropped and bounce as the signals that need a human or a code path. Our glossary entries on hard bounces and soft bounces explain how the failure types differ.

Why 97 of 100 is a common shape

People on Rails forums describe this exact setup: 100 sent through SendGrid SMTP, 97 visible in webhooks. The answers there line up with how SendGrid works. Commenters explain that "processed" means accepted by SendGrid and "delivered" means accepted by the recipient, and that the missing ones were likely rejected for syntax or DNS reasons.

SMTP to SendGrid is a handoff, not a delivery. SendGrid returns a success reply once it takes the message, and checks such as suppression lists and address validity can happen afterward. Your Rails app sees success while SendGrid drops the message. The only trace is a dropped event with a reason string, in the Activity Feed and in the webhook if that event type is switched on.

The causes, most common first

CauseSymptomFix
Webhook not subscribed to dropped, bounce or deferredOnly successful events arrive; the count never adds upEnable all five event types
Address on a suppression listSame user "never gets" mail; dropped in Activity FeedCheck suppressions, fix the cause, remove if appropriate
Malformed address or domain with no MXException from deliver_now!, or a dropped or bounce eventValidate addresses at signup
deliver_later job failed or was discardedNo log line, no event at allCheck your job queue; debug with deliver_now!
Your webhook endpoint returned non-2xx or timed outEvents missing or delayed in your databaseReturn 2xx fast, process in a job

I cannot tell you SendGrid's retry window for failed webhook posts from memory, so check SendGrid's current event webhook documentation before you build on a specific number.

Step 1: make Rails raise the error

deliver_later runs in a background job, so an SMTP exception lands in your job queue, not in front of you. While debugging, send synchronously and loudly:

# Raises on delivery errors even if raise_delivery_errors is false
UserMailer.welcome(user).deliver_now!

deliver_now respects config.action_mailer.raise_delivery_errors; deliver_now! raises regardless. Check that the setting is true in the environment you test in, because development configs often turn it off.

Rescue the useful exceptions and log them with the recipient:

begin
  UserMailer.welcome(user).deliver_now!
rescue Net::SMTPSyntaxError, Net::SMTPFatalError => e
  Rails.logger.error("mail_failed to=#{user.email} class=#{e.class} msg=#{e.message}")
rescue Net::SMTPServerBusy, Net::OpenTimeout => e
  Rails.logger.warn("mail_retryable to=#{user.email} class=#{e.class} msg=#{e.message}")
end

Net::SMTPSyntaxError is a 5xx syntax rejection (a malformed address, for instance), Net::SMTPFatalError is any other permanent 5xx, and Net::SMTPServerBusy is a 4xx temporary failure. If a failure appears here, SendGrid never accepted the message, which explains an email that never produces even a processed event.

Confirm the SMTP settings while you are there:

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

The username is the literal string apikey; the password is your API key.

Switch back after debugging

deliver_now! blocks the request while it talks to SendGrid. Use it to find the problem, then return to deliver_later and log failures from inside the job.

Step 2: subscribe to every event you care about

In the SendGrid dashboard, open the Event Webhook settings (search the settings menu for "Event Webhook") and select at least processed, dropped, deferred, delivered and bounce. Without dropped and bounce, you are measuring only the successes, and the 97-of-100 count will keep looking like a mystery.

Your endpoint receives a JSON array of events in each POST. Return a 2xx quickly and do the real work in a job:

class SendgridEventsController < ApplicationController
  skip_before_action :verify_authenticity_token

  def create
    events = JSON.parse(request.body.read)
    events.each { |e| SendgridEventJob.perform_later(e) }
    head :ok
  end
end

Events can arrive out of order and in batches, and the same event can arrive more than once. Store them keyed by message and event type, and never assume delivered follows processed immediately.

SendGrid also supports signed event webhooks. Turn on signature verification before you expose this route publicly.

Step 3: tag each message so you can match it

Matching webhook events to Rails records by recipient email is fragile; the same address can get several messages. Attach your own ID through SendGrid's SMTP API header, and it comes back on every event for that message:

class UserMailer < ApplicationMailer
  def welcome(user)
    headers["X-SMTPAPI"] = { unique_args: { mail_log_id: user.id.to_s } }.to_json
    mail(to: user.email, subject: "Welcome")
  end
end

The custom value appears as a top-level field in each event object. Also record the sg_message_id from the events, since it is what you quote to SendGrid support. For a real mail log, create your own record per send (with a unique ID) and use that ID in unique_args rather than the user ID, so two messages to one user stay distinct.

Step 4: find the missing 3

Take the 3 recipients, then walk this list in order:

  1. Search your logs for the mail_failed lines from Step 1. A hit means SendGrid never accepted the message.
  2. Search the SendGrid Activity Feed by recipient address. Look for dropped (the reason string names the cause, such as a prior bounce or an invalid address) or bounce.
  3. Check SendGrid's suppression lists for the address. An address that bounced once is suppressed on later sends, a common reason the same user "never gets" mail.
  4. Check your webhook endpoint's logs for 4xx or 5xx responses during the send window.
  5. If a message has processed but nothing after, look for deferred. Retrying is SendGrid's job; give it time.
  6. If it shows delivered but the user says it never arrived, check the spam folder and the headers of a received copy with the email header analyzer. Authentication failures show up there; if SPF or DKIM is the issue, the SPF generator and our SPF, DKIM and DMARC setup guide cover the records.

Syntax and DNS problems are the usual suspects among the missing ones: a typo in the domain, a trailing space, or a domain with no MX record. Validate addresses at signup so those never reach your mailer. Regular list hygiene and a clear suppression list habit keep the same addresses from failing again.

Which count to trust

Pick the definition that matches the question you are asking.

QuestionUse thisCaveat
Did my app hand it off?deliver_now! returns without errorSays nothing about SendGrid's later checks
Does SendGrid have it?processedIt may still be dropped or deferred
Did the recipient's server accept it?deliveredCould still land in spam
Did it fail for good?dropped or bounceRead the reason text before retrying
Did a person see it?Not available from these eventsOpens are unreliable; look at replies or clicks

Checklist before you trust your numbers

  • The webhook subscribes to processed, dropped, deferred, delivered and bounce.
  • Your endpoint returns 2xx quickly and logs any failure.
  • Events are stored by message and event type, so duplicates and reordering do no harm.
  • Every message carries your own ID in unique_args, and you store sg_message_id.
  • Rails logs SMTP exceptions with the recipient address.
  • You alert on dropped, bounce and any message with no final event after several hours.

If nothing works

If an email shows delivered and the recipient swears it never came, SendGrid support can see more than you can. Contact them through your SendGrid account's support channel with the sg_message_id, the recipient address, the timestamp in UTC, the event JSON you received and what you already checked.

Subject: Message shows "delivered" but recipient did not receive it

Hello,

Message ID (sg_message_id): {sg_message_id}
Recipient: {recipient@example.com}
Sent at (UTC): {timestamp}
Sending method: SMTP via smtp.sendgrid.net, port 587, from a Rails app

The Event Webhook shows "delivered" for this message, but the recipient
says it never arrived and it is not in their spam folder. I have checked
the suppression lists and my webhook logs; no errors were found.

Could you share the recipient server's response and any later handling
you can see for this message?

Thank you.

For the wider picture of how webhook-based systems behave, see our email API and webhooks guide and the webhook glossary entry.

Common questions

Does "delivered" mean the email reached the inbox?

No. It means the recipient's mail server accepted the message from SendGrid. The server can still route it to spam or quarantine afterward, and SendGrid has no event for that.

Why did Rails report success for an email that was dropped?

SMTP to SendGrid only confirms that SendGrid accepted the message. Suppression and validity checks can happen after that, so the drop shows up as a dropped event, not as a Rails exception.

Should I use deliver_now! in production?

Usually not. It blocks the request and raises on failure, which is good for debugging. In production, use deliver_later and log or alert on failures inside the job.

Why would an address be suppressed when it looks fine?

SendGrid suppresses addresses that previously bounced, reported spam or unsubscribed. The address can be valid now and still be blocked from earlier history; check the suppression lists and read the dropped reason.

comparisonssendgrid
Share this article
Sohail Hussain

Sohail Hussain

Founder & CEO at Mailneo

Building Mailneo — AI-powered email marketing for growing businesses.

Related Articles

Comparisons

ACS Email retirement: alternatives for sending email from Azure

If you send from Azure through Azure Communication Services Email and it is being retired, you can move to SendGrid, Mailgun, Brevo, SocketLabs or Microsoft Graph. Keep the provider key in Key Vault, publish new DNS records before cutover, and shift traffic in stages while you watch bounces.

Sohail Hussain|13 min read
Comparisons

Scan-to-Email After Microsoft 365 SMTP AUTH: Relay Options

When Microsoft 365 stops accepting basic SMTP AUTH, scanners need another path. For under 100 scans a day, the simplest option is an authenticated third-party relay on port 587 or 2525; SMTP2GO was the most recommended in one MSP thread. Direct Send and a local relay such as hMailServer are the alternatives. Check outbound port 25 first.

Sohail Hussain|14 min read
Comparisons

SendGrid Free Tier IPs on Spamhaus: Deferred Mail, Alternatives

If SendGrid mail is deferred because a shared IP landed on Spamhaus, your options are a paid plan, a dedicated IP, or another relay such as Amazon SES or SMTP2GO. First confirm the IP is the cause and not your domain, content or the recipient. Then pick by cost and effort.

Sohail Hussain|10 min read
Comparisons

SendGrid free plan discontinued: what to use instead for low volume

SendGrid retired its free plan, and $19 a month is hard to justify for under 100 emails. AWS SES costs about $0.10 per 1,000 emails, and commenters also named MailerSend, Brevo, Resend, Mailgun and SMTP2GO for their free tiers. Verify current limits before you commit.

Sohail Hussain|11 min read

Ready to supercharge your email marketing?

Start sending smarter emails with AI-powered campaigns. No credit card required.

Get Started Free