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, can read a DNS TXT record, and know the difference between transactional and marketing mail. It covers the three outcomes a message can have at a mailbox provider. It also covers how to tell them apart in your own data. Later chapters explain why a provider picks one outcome over another.
Three outcomes, two moments
A receiving mailbox provider (for example Gmail, Outlook.com, or Yahoo) makes its decision at two different moments.
- During the SMTP conversation. The provider can accept the message, defer it, or refuse it while your server is still connected. You see the result immediately as a reply code.
- After acceptance. Once the provider has said "250 OK", it runs more filters and decides which folder the message goes in. You get no reply code for this step.
That split explains most of the confusion about "deliverability". Delivered and inbox placed are different things. A message can be delivered, meaning the provider accepted it, and still land in the spam folder.
Outcome 1: the inbox
Inbox placement means the message appears in the recipient's primary view, where the recipient is most likely to see it. Two details matter:
- Tabs and categories. Some providers sort accepted mail into tabs such as Primary, Promotions, or Updates. These tabs are still the inbox as far as the provider is concerned. Mail in Promotions gets fewer opens than mail in Primary, but it is not a spam-folder outcome. Don't count it as a failure in your placement reporting.
- Priority sorting. Some providers rank or highlight messages from senders the recipient interacts with. Placement is therefore a spectrum of visibility, not a single yes or no.
You can't observe inbox placement directly from the SMTP reply. A "250 OK" tells you only that the provider took responsibility for the message.
Outcome 2: the spam folder
Spam folder placement means the provider accepted the message but filed it in a junk or spam folder. The recipient can still find it, but few people look there.
Key facts about this outcome:
- The sender gets no notice. There is no bounce, no error, and your SMTP logs look identical to an inbox delivery.
- It is often per recipient. Providers can personalize filtering. The same campaign can reach the inbox for engaged recipients and the spam folder for others.
- It is reversible by the recipient. If a user clicks "Not spam" or moves the message to the inbox, that action is a strong positive signal. The reverse is also true: a user who moves your message to spam sends a strong negative signal.
Because the sender sees nothing, spam-folder problems usually show up indirectly: opens drop, clicks drop, and replies dry up for a segment of your list.
Outcome 3: rejection
Rejection means the provider refuses the message during the SMTP conversation. You get a reply code and usually a text explanation. The reply code classes are:
| Class | Meaning | Typical sender action |
|---|---|---|
| 2xx | Accepted | Nothing. Placement is still unknown. |
| 4xx | Temporary failure (deferral, throttling, greylisting) | Retry later with backoff |
| 5xx | Permanent failure | Do not retry. Investigate or suppress. |
A 5xx reply can mean two quite different things:
- A recipient problem. For example,
550 5.1.1 User unknownmeans the mailbox does not exist. Remove that address from your list. - A sender problem. For example, a refusal citing a failed authentication check, a blocklisted IP address, or a poor sender reputation. Removing the recipient would be the wrong response, because the address may be fine. The fix is on your side.
The enhanced status code (the 5.x.x part) and the free-text message help you tell these apart. Read them. Don't rely on the three-digit code alone.
Deferrals are a warning, not a failure
A 4xx reply such as 421 4.7.0 Try again later or 451 4.7.1 Greylisted asks you to come back later. Providers use deferrals to slow down senders they are unsure about. Your mail server should retry on a schedule, typically for several days, before giving up and generating a bounce.
Frequent deferrals from one provider are an early sign that its filters distrust your traffic. They often appear before the first spam-folder or rejection problems.
Bounces: synchronous and asynchronous
Rejections reach you in two ways.
- Synchronous (inline) rejection. Your server receives the 5xx reply during the connection. It knows immediately and generates a bounce record.
- Asynchronous bounce. The provider first accepts the message, then later fails to deliver it. It sends a separate non-delivery report (NDR) back to your return-path address. This happens when mail passes through relays or when a filter acts after acceptance.
Your bounce handling has to cope with both. If you only watch SMTP replies, you will miss asynchronous bounces, which arrive at the return-path (envelope sender) address.
Silent discard and quarantine
There is a fourth case that does not fit neatly into the three outcomes. Some providers, and many corporate gateways, accept a message and then drop it or hold it in a quarantine that only an administrator can release. The sender sees a 2xx reply and the recipient sees nothing.
You can't detect this from your side except by comparing sent counts against engagement or against seed tests (test mailboxes you control). When you suspect it, look for a segment where deliveries are high but engagement is zero.
Handling replies in code
The following sketch classifies SMTP reply codes and computes a complaint rate. Both calculations feed the reputation signals covered in later chapters. The key idea here is that a permanent failure must not be retried, because repeated sends to dead addresses harm your reputation.
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"
def complaint_rate(complaints: int, delivered: int) -> float:
"""Share of delivered messages that recipients reported as spam."""
return complaints / delivered if delivered else 0.0
print(classify_smtp_reply(550)) # suppress
print(complaint_rate(12, 10000)) # 0.0012This code is deliberately simple. In production, suppress should be refined using the enhanced status code. A 5.1.1 (unknown user) justifies suppression of the address. A 5.7.x (policy or security) code usually points at your sending setup, and suppressing the address would hide the real problem.
Also note the denominator in complaint_rate: complaints divided by delivered messages, not by sent messages. Providers and their tools generally measure against accepted or inbox-delivered volume, so check which base each tool uses before comparing numbers.
Reading the outcome from your data
Each outcome leaves different evidence. Use this table to decide where to look.
| Outcome | Where it shows up | What you can measure |
|---|---|---|
| Inbox | Opens, clicks, replies | Engagement rates, seed test results |
| Spam folder | Absence of engagement; sometimes provider tools | Drop in opens or clicks for one provider, spam rate in postmaster tools |
| Rejection (5xx) | SMTP logs, bounce webhooks | Bounce rate by provider and by status code |
| Deferral (4xx) | SMTP logs, queue depth | Delay, retry count, age of queued mail |
| Silent discard | Nowhere directly | Delivered but never engaged segments |
Caveats about opens
Open tracking relies on a tiny image loaded when the recipient views the message. Some mail clients preload images through a proxy, which marks messages as opened even when nobody read them. Treat opens as a rough signal and prefer clicks and replies when you judge placement.
Common errors
- Equating "delivered" with "inbox". Your ESP dashboard may report a delivery rate of 99 percent while a large share of those messages sit in spam folders.
- Retrying permanent failures. Sending again to an address that returned a 5xx user-unknown reply costs reputation and gains nothing.
- Suppressing on policy rejections. If a provider rejects mail because of your IP or domain, deleting the recipients cleans your list of valid, wanted subscribers while the real fault remains.
- Ignoring deferrals. Treating 4xx replies as harmless noise hides the first sign of trouble.
- Judging placement by one provider. Each provider decides independently. A result at one does not predict another.
Summary of what each outcome tells you
- Inbox means the provider trusted the message enough to show it.
- Spam folder means the provider accepted it but distrusted it, and it told you nothing.
- Rejection means the provider refused it, and told you why in the reply text.
- Deferral means the provider is hesitating, and it is a signal worth watching.
The remaining chapters work backward from these outcomes. They look at what the provider checks (authentication, reputation, engagement, filters) and what you can do to move your mail toward the inbox.
Exercise
Your sending log shows a 99 percent delivery rate for a campaign to a large mailbox provider, but clicks from that provider are 80 percent lower than usual. Bounces are normal. What is the most likely explanation, and why can't your SMTP logs confirm it?
Show answer
The provider accepted the mail (2xx replies, so it counts as delivered) but most likely filed it in the spam folder, or discarded it silently after acceptance. Post-acceptance filtering produces no reply code and no bounce, so SMTP logs look the same as for inbox delivery. You can confirm it with the provider's postmaster tools (spam rate), seed test mailboxes, or by comparing engagement across providers.
Exercise
Two bounce reports arrive. One says "550 5.1.1 User unknown". The other says "550 5.7.1 Message rejected due to poor sender reputation". What should you do with each?
Show answer
For the 5.1.1 bounce, suppress the recipient address, because the mailbox does not exist and retrying harms your reputation. For the 5.7.1 bounce, do not suppress the recipient, because the address is probably valid. The problem is your sender reputation, so investigate authentication, complaint and bounce rates, and list quality, and consider pausing or reducing sends to that provider until it is fixed.