Sub topic 2
Inbox, spam folder, or rejection: what each outcome means
This chapter assumes you know the basics of sending email through an ESP or SMTP server, and that you can read a simple DNS record. It covers the three results a message can have at a mailbox provider, how you can tell them apart, and why "delivered" is a misleading word.
Two decisions, not one
A receiving provider makes two separate decisions about each message.
- Accept or refuse. This happens during the SMTP conversation, while your server is still connected. The provider replies with a numeric code.
- Where to put it. This happens after acceptance. The provider's filters choose the inbox, the spam folder, or in rare cases a quarantine or silent drop.
The first decision is visible to you because the reply comes back in the same session. The second is mostly invisible, because the provider has already said "OK."
Outcome 1: Rejection
A rejection means the provider refused the message during the SMTP session. You receive a reply code that tells you how to react.
| Code range | Meaning | Correct handling |
|---|---|---|
| 2xx | Accepted | Record as accepted, not as inbox placement |
| 4xx | Temporary failure (greylisting, throttling, rate limits) | Retry later with backoff |
| 5xx | Permanent failure (unknown user, policy block, failed authentication) | Stop sending and suppress the address, unless the text shows a block on your side |
Many providers add an enhanced status code and a text explanation, such as 550 5.7.1 followed by a policy message. Read the text. A 5.1.1 usually means the mailbox does not exist, so the address is bad. A 5.7.x code usually points at you: authentication, reputation, or policy.
def classify_smtp_reply(code: int) -> str:
"""Map an SMTP reply code to a handling decision."""
if 200 <= code < 300:
return "accepted"
if 400 <= code < 500:
return "retry_later" # temporary failure (4xx)
if 500 <= code < 600:
return "suppress" # permanent failure (5xx)
return "unknown"
for reply in (250, 451, 550):
print(reply, classify_smtp_reply(reply))
# 250 accepted
# 451 retry_later
# 550 suppressRepeatedly sending to addresses that return permanent failures hurts your reputation, which later chapters cover. Treat suppress as a real action, not a log message.
Outcome 2: Spam folder
Here the provider returned a 2xx code and then filed the message in the junk folder. Your server sees success. No bounce arrives. Your ESP will usually report the message as "delivered."
The spam folder is a verdict about your message, your sending identity, or both. It is not an error. Recipients can still find the message and move it to the inbox, and that action is a strong positive signal.
Outcome 3: Inbox
The message reaches the primary view. Some providers sort mail into tabs or categories, such as Promotions or Updates. A message in a tab is generally still counted as inbox placement, but it gets less attention from the reader. Treat tab placement as a separate result when you measure.
"Delivered" is not "inboxed"
This gap explains most confusing placement reports. Accepted-but-filtered mail is only visible indirectly: through falling opens, postmaster tool data, and seed tests. Later chapters cover those tools.
Two further cases are worth knowing:
- Silent drop. A few providers accept a message and then discard it with no folder at all. It is rare and hard to prove.
- Deferral loops. A run of 4xx replies is a warning. If the provider keeps throttling you, it is usually reacting to volume or reputation, and retrying harder makes it worse.
Exercise
Your ESP dashboard shows 98% delivered, but opens dropped by half this week and no bounces increased. Which outcome is the most likely explanation, and why can't the delivery rate rule it out?
Show answer
Many messages were probably accepted (2xx) and then filed in the spam folder. "Delivered" only counts SMTP acceptance, which happens before the provider chooses a folder, so spam placement produces no bounce and does not lower the delivery rate.