Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Mail tool to add CC and BCC

by atcroft (Monsignor)
on Sep 02, 2011 at 06:52 UTC ( #923773=note: print w/replies, xml ) Need Help??

in reply to Mail tool to add CC and BCC

You do know the difference between headers and envelope headers, right?

Since you didn't provide an example of the code you are looking at, let's take a different approach to showing what happens... If I want to send an email by connecting to a mail server (for instance, through a telnet program), it would look something like this:

$ telnet 25 Trying Connected to ( Escape character is '^]'. 220 ESMTP HELO 250 MAIL FROM: <> 250 ok RCPT TO: <> 250 ok RCPT TO: <> 250 ok RCPT TO: <> 250 ok DATA 354 go ahead Date: 02 Sep 2011 01:45:59 -0500 Subject: test From: "Sender" <> To: "Recipient 1" <> CC: "Recipient 2" <> test . 250 ok 1314945967 qp 19908 quit 221 Connection closed by foreign host.

What this means is that BCC recipients are those who appear in the envelope header (RCPT TO lines), whereas TO and CC recipients appear both there and in the DATA section of the email.

This gives you the following email:

Received: (qmail 12019 invoked from network); 2 Sep 2011 01:46:09 -0500 Received: from (HELO ( by with SMTP; 2 Sep 2011 01:46:20 -0500 Received-SPF: pass ( SPF record at designates as permitted sender) Date: 02 Sep 2011 01:45:59 -0500 Subject: test From: "Sender" <> To: "Recipient 1" <> CC: "Recipient 2" <> test

Hope this helps.

Update: 2011-09-02
Added sample email output.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://923773]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2016-10-28 01:28 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (374 votes). Check out past polls.