Forum Moderators: coopster

Message Too Old, No Replies

Problems with Bcc:

PHP Mail Bcc

         

Marrand

6:37 pm on Mar 25, 2005 (gmt 0)

10+ Year Member



Hi
I've setup a simple mail form which works ok.
I have the client's email address as the To: field and mine as the Bcc: .

But, in the email I receive, I look at the header information (View-Options in MS Outlook), and it displays the Bcc field and my email address. Is there something I can do to prevent the BCC showing in the header info? Do I need to add other header details?

The code that prepares the header is simply:
$header = "From: $email \n";
$header .= "Bcc: $bccemail \n";

The header details in the received email shows...
Date: Wed, 16 Mar 2005 21:49:14 +0000
To: <clients email address>
Subject: <subject>
From: name@sender.com
Bcc: <my email address>
X-HSTID:19555

Thanks

jatar_k

6:40 pm on Mar 25, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



the email you receive should have the Bcc: have you compared the headers from both emails to see if it is in both?

try sending the email to 2 addresses you control and verify both sets of headers. Check and see if the Bcc: shows up in the other one.

Marrand

7:25 pm on Mar 25, 2005 (gmt 0)

10+ Year Member



Thanks Jatar
I should have tried some experiments before posting, but the problem is still there.

I tried it with 2 different email addresses for me - one as To: and other as BCC: but the To: email has headers which displays the BCC email address, which should not happen. There is also a strange header which is - X-HSTID: 19555 . Do you know what that is?

I also tried using the same form on a different server, which works fine. So, I think the client's server must be a different kind - for example, I had to change the code \r\n to just be \n in order to work on the clients server. Otherwise the Bcc code actually shows up in the body of the email.

jatar_k

7:43 pm on Mar 25, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



hmm, interesting, I haven't looked at the headers trying to track down Bcc: actually, just one of those things I have never worried about. I have enough trouble with emails with out having to look into every little thing.

INteresting, I tried it with a few of my emails and it didn't come up in the headers.

not sure why that one is. X headers (that start with X-) are just extra info, they are added all over the place by the mail server and its associated programs.

I can suggest that if you really want a copy of this email you have the option of just calling the mail function again and sending the message to yourself as well.

jollymcfats

10:07 pm on Mar 25, 2005 (gmt 0)

10+ Year Member



I had similar problems until I started setting bcc in all lower case. Maybe it's just my MTA being picky, but it worked for me.

E.g. 'bcc: someone@example.com'