Hey every one,

Trying to write a mailing list program for my high school. When I was first thinking about it it was going to be easy....drop all the addresses in the Bcc line and send it off. Then most unfortunately reality set in and I found out that PHP's mail() function within Windows has a very weird (possibly non-exsistent) interpretation of Bcc:

My current send program looks like this:

$headers = "To: listserv@msad71.net \r\n";
$headers .= "From: \"KHS Mail Sender\" reply@msad71.net>\r\n";
$headers .= "Reply-To: <noreply@msad71.net>\n";
$headers .= "X-Sender: <noreply@msad71.net>\n";
$headers .= "X-Mailer: PHP4\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Return-Path: <noreply@msad71.net>\n";
$headers .= $bcc;

$bcc is obviously the list of e-mails to be sent out via bcc.

I then send with the function:

mail($to, $subject, $body, $headers);

My first question is...is it at all possible to use the Bcc header in windows. In my searching for the solution I have read things that say it can't and some say it can.

Secondly if it does work, what do I have to change to make it work (see above code). Or if it doesn't work at all, what do you think is the best alternative?

Many thanks,
Andy Nortrup

    • [deleted]

    As far as I am aware, mail on Windows will not do a Bcc. The alternatives are to send a single mail to each person or go to the latest dev release (4.3). According to the php manual, 4.3 will start supporting Bcc on Windows...

    You can get a dev relase for win32 at:
    http://snaps.php.net/win32/

      Sounds like upgrading may be the best alternative...how stable is the 4.3 release (we don't do too too much PHP, but the things we have may be severly missed) Mostly we just use it to work with MySQL databases.

      -Andy

        • [deleted]

        I'm thinking 4.3 is fairly stable..Last weeks PHP Weekly Summary said it was about to go into release cycle...

          Write a Reply...