Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question

migrated from stackoverflow.com Jun 25 '10 at 1:56

This question came from our site for professional and enthusiast programmers.

3  
why is this being downvoted? It's an interesting question after all... –  nico Jun 24 '10 at 17:33
3  
@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 '10 at 17:35
1  
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 '10 at 21:17
add comment

4 Answers 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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

In short - yes it is possible if you can connect directly to the recipients SMTP server. For the reasons "Rup" outlines 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) log into 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 recipients 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: <test@mydomain.co.uk>
250 2.1.0 OK f70si17620845wej.110
RCPT TO: <user_i_missed_out@mydomain.co.uk>
250 2.1.5 OK f70si17620845wej.110
DATA
354  Go ahead f70si17620845wej.110
To: recipient_on_original@somewhere.com
cc: another_recipient_ion_original@somwhereelse.com, user_i_missed_out@mydomain.co.uk
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 user_i_missed_out@mydomain.co.uk receives a copy of the email that has him on the cc list as well as the original addressee recipient_on_original@somewhere.com, and the original cc recipient another_recipient_on_original@somewhere.com.

However, since we never actually connected to the latter two's mail server, they don't actually receive the email second time around.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.