29

I actually started thinking about this because I forgot to CC someone on an email I was supposed to send, and I wanted him to get a copy without double-sending to everyone else. I ended up just forwarding it to him, but I'm still curious.

Where are the CC and BCC lists handled in SMTP? Would you need to control the SMTP server, or can it be done client side?

Thanks!

3
  • 5
    why is this being downvoted? It's an interesting question after all...
    – nico
    Jun 24, 2010 at 17:33
  • 5
    @Achilles - The details of whether or not this is possible is ABSOLUTELY a programming question IMHO. It is defined in RFCs 2821 and 2822. At the end of the day, all mail clients out there are programmed according to these definitions, and each and every developer here may well have to delve into SMTP at some point. I certainly have.
    – Rob Levine
    Jun 24, 2010 at 17:35
  • 4
    PLEASE stop voting to close this as "belongs on SuperUser". Just because the OP says it was the action of sending an email that got him thinking about the issue, it doesn't make the actual question "not programming related". If I had an http implementation question that occurred to me when I clicked on a web link, would that be "not programming related"? No.
    – Rob Levine
    Jun 24, 2010 at 21:17

5 Answers 5

24

In short - yes it is possible if you can connect directly to the recipients SMTP server. For the reasons Rup outlines in his answer it may not be especially practical, and if you are on a network behind a firewall you may not be able to get a connection to a remote server on TCP port 25 at all.

Assuming this doesn't apply for you, then here is the detail:

When you (as a mail client) connect to the recipient's mail server, all that server cares about (for delivery purposes) are the recipients specified in RCPT TO:. See RFC2821 - Simple Mail Transfer Protocol. It doesn't differentiate between the type of recipient (to:, cc: or bcc:), it just knows you are saying "make sure the recipient on your server receives this".

However, as far as the recipient's actual mail client is concerned, it is the headers in the message that say who all the recipients of the message were. See RFC2822 - Internet Message Format.

In other words, the TO:, CC: and BCC: headers are there for the benefit of the mail client, whereas the actual distribution is handled during the SMTP 'conversation' with the mail servers.

So you can, in fact, have a conversation with an SMTP server that looks something like this:

C:>telnet aspmx.l.google.com 25
220 mx.google.com ESMTP f70si17620845wej.110
HELO myserver.mydomain.co.uk
250 mx.google.com at your service
MAIL FROM: <[email protected]>
250 2.1.0 OK f70si17620845wej.110
RCPT TO: <[email protected]>
250 2.1.5 OK f70si17620845wej.110
DATA
354  Go ahead f70si17620845wej.110
To: [email protected]
cc: [email protected], [email protected]
Subject: My email

Hi - this is a test
.
250 2.0.0 OK 1277401976 f70si17620845wej.110
QUIT
221 2.0.0 closing connection f70si17620845wej.110


Connection to host lost.

The net effect is that [email protected] receives a copy of the email that has him on the cc list as well as the original addressee [email protected], and the original cc recipient [email protected].

However, since we never actually connected to the latter two's mail servers, they don't actually receive the email second time around. And since we cannot change the mails that have already been sent off to them before, they will never notice that we added another cc recipient.

1
  • 1
    My email client is telnet. This is a true geek's answer! Mar 24, 2022 at 7:14
4

What happens is

  1. You send the email to your local (or ISP's) SMTP server
  2. Your local SMTP server expands out the recipient list and works out the list of servers it will need to talk to for all the recipients. It removes the BCC header from the message.
  3. For each server, it connects and says "Here is an email for recipients X, Y: here is the message headers and body"

i.e. if you can inject the email into 3, deliver directly to the missed CC user's home SMTP server, then you can deliver them the CC without having to send the mail to everyone else. In particular a BCC recipient will get message headers and body that do not mention them at all (except maybe an 'X-Envelope-To' header).

In practical terms, though, it's a lot easier to send to everyone. To do this efficiently you'd need to modify your email client and local SMTP server to support a fake recipient list, or a don't-really-send-to exclusion list, that it processes during recipient expansion.

2

This problem is actually solved by an existing IETF work-in-progress: the Cosmetic Carbon Copy. Unfortunately, I don't know of any email client that actually implements CCCs, as the draft is widely considered to be a pointless joke for April Fool's Day.

In all seriousness, what you're asking is possible, mostly because the content of an email doesn't actually affect who the mail is sent to at the SMTP layer. Email clients are written to send mail to everyone in the To, CC, and BCC fields, but they aren't required to do this by any standard.

Updated: To be precise, when sending mail to an SMTP server, the sender uses the RCPT command to specify which email addresses a message should be delivered to. It then sends the contents of the mail with a DATA command. The SMTP server shouldn't look at the content. It should be possible to add one recipient to the CC header line of a message and ask the SMPT server deliver it to only that one address.

1

If I understand this correctly, what you are trying to do is send a message a second time, including the original recipients in the To: and CC: headers, but only have that message received by some additional recipient(s). As other answers have noted, this can be accomplished by your email client communicating with the SMTP server and specifying just one recipient, but including the To: and Cc: headers of the original email.

The Apple Mail client has functionality that can do effectively this. The Redirect function can be found in the Message menu, or contextual menu for a message. This function is designed to be used as a way to transparently forward an email to someone else without adding Fwd: to the subject line and increasing the quote level, but it can also be used on messages that you have sent previously. It keeps the To/Cc/From fields of the original message the same, and adds the new recipients in the Resent-To and Resent-CC headers. The only recipients of the resent message will be the ones you specify when composing it. It's not completely obvious how this works when you make use of the feature, so be sure to test it out beforehand.

-1

It may be allowed/disallowed on a client-by-client basis, but you can try putting something fake (like ";;undisclosed recipients;;") in the To and putting everyone in the BCC. Then repeating the process will make it look like the same email, as long as nobody's watching closely enough to timestamps and threaded messages and such.

You must log in to answer this question.