emailverifier.dev
Posts

How Bcc Works: SMTP Envelopes, Headers, and Hidden Recipients

| 5 min read | Usama Ejaz
An email envelope sends copies to To, Cc, and Bcc recipients while the visible message header omits the Bcc address.

Bcc works because SMTP delivery recipients and visible message headers are two different things. The sender gives the mail server every destination, including blind recipients, through the SMTP envelope. Before the message is transmitted, the Bcc header is normally removed. The server can still deliver the message because it already has each address from the envelope.

That answers the apparent contradiction: if Carol is not named in the email Carol receives, her address was carried by RCPT TO, not by the visible To: or Cc: fields.

One email has two recipient layers

Suppose a hypothetical release notice is addressed like this:

From: sender@example.test
To: alice@example.test
Cc: bob@example.test
Bcc: carol@example.test, dave@example.test

The submission system first builds an SMTP envelope. A simplified transaction can contain four recipient commands:

MAIL FROM:<sender@example.test>
RCPT TO:<alice@example.test>
RCPT TO:<bob@example.test>
RCPT TO:<carol@example.test>
RCPT TO:<dave@example.test>
DATA

RFC 5321 defines each RCPT TO command as one destination for the mail data. Those commands are transport instructions. They are not part of the message a recipient opens.

After DATA, the transmitted message can look like this:

From: sender@example.test
To: alice@example.test
Cc: bob@example.test
Subject: Hypothetical release notice

The release is ready.

Carol and Dave are still envelope recipients, but their addresses are absent from the message headers. Alice, Bob, Carol, and Dave can receive the same visible content without learning the blind-recipient list.

The Bcc field is an instruction, not a delivery record

RFC 5322 defines Bcc as recipients whose addresses should not be revealed to the other recipients. It allows three implementation patterns. A sender can remove Bcc from every delivered copy, give blind recipients separate copies with an appropriate Bcc field, or leave an empty Bcc: field to signal that blind copies were sent.

The common pattern is the first one: copy every To, Cc, and Bcc address into the SMTP envelope, then remove Bcc before transmission. RFC 5321 recommends exactly that separation when a submission system has to derive an envelope from message headers.

This is also why adding an address to a raw Bcc: header is not, by itself, a reliable way to deliver mail. A low-level SMTP API may expect you to supply the envelope recipient list separately. If the blind address never becomes a RCPT TO destination, the server has no delivery instruction for it.

The reverse mistake is worse for privacy: putting the blind address in the envelope but leaving Bcc: in the transmitted bytes can disclose it to every recipient. Header construction must therefore happen before final serialization, with the envelope kept separate. That same boundary matters when preventing email header injection.

A safe mail library keeps the two layers apart

I tested Python's standard smtplib behavior with a capture transport. The fixture never opened a network connection. It recorded the envelope and the serialized message produced by send_message():

from email.message import EmailMessage
import smtplib

class CaptureSMTP(smtplib.SMTP):
    def __init__(self):
        self.captured = None

    def ehlo_or_helo_if_needed(self):
        pass

    def sendmail(
        self, sender, recipients, message,
        mail_options=(), rcpt_options=()
    ):
        self.captured = sender, list(recipients), message
        return {}

msg = EmailMessage()
msg["From"] = "sender@example.test"
msg["To"] = "alice@example.test"
msg["Cc"] = "bob@example.test"
msg["Bcc"] = "carol@example.test, dave@example.test"
msg["Subject"] = "Hypothetical release notice"
msg.set_content("The release is ready.")

smtp = CaptureSMTP()
smtp.send_message(msg)

The executed fixture passed five checks. Its envelope contained all four recipients. Its transmitted headers kept To and Cc, omitted Bcc, and contained neither blind address.

MAIL FROM: <sender@example.test>
RCPT TO: <alice@example.test>
RCPT TO: <carol@example.test>
RCPT TO: <dave@example.test>
RCPT TO: <bob@example.test>

Transmitted headers:
From: sender@example.test
To: alice@example.test
Cc: bob@example.test
Subject: Hypothetical release notice

PASS: all four recipients are in the SMTP envelope
PASS: the transmitted message has no Bcc header
PASS: the To header remains visible
PASS: the Cc header remains visible
PASS: blind addresses are absent from message bytes

Recipient order in the envelope is not significant here. The useful invariant is that every intended destination appears in the envelope while blind addresses stay out of the transmitted header block. Python's documentation makes the same guarantee: send_message() derives recipients from the address headers when needed, but does not transmit Bcc or Resent-Bcc headers.

Separate copies can reduce accidental disclosure

Removing Bcc from one shared message is not the only valid strategy. A sender may create a separate copy for each blind recipient. That copy can include only that recipient in Bcc, while the copies for visible recipients contain no Bcc field.

Separate copies are useful when the sender wants a blind recipient to know they were intentionally copied. They also prevent blind recipients from seeing one another. The tradeoff is operational: every variant becomes a distinct message that must be serialized, signed, queued, retried, and tracked consistently.

Do not mutate a DKIM-signed message after making these copies. Finalize the headers for each variant first, then sign that variant. The relationship between the visible From identity and the SMTP envelope is covered in more detail in my guide to From, Reply-To, and Return-Path.

What Bcc does not hide

Bcc hides an address from the other recipients' message headers. It does not hide the address from the sender's mail service, the receiving server, delivery logs, abuse systems, or anyone with access to the SMTP envelope. It is not encryption, anonymous delivery, or proof that a recipient will keep the copy confidential.

A blind recipient can also reveal their presence by replying to the visible participants. RFC 5322 calls out this exact risk: a blind recipient who sees no Bcc marker may reply to all and expose that they received the message. Mail-client behavior varies, so Bcc should not carry a workflow that depends on the recipient remaining undiscoverable.

For application code, the safe boundary is concrete: build the complete envelope recipient set, serialize a message that omits blind addresses, inspect the final wire bytes, and only then hand both objects to the SMTP client. Bcc privacy lives in that separation.

Sources

Continue reading