Reply to Mail() is eating my bcc: header

Your name:

Reply:


Posted by Tim Ferguson on 01/15/07 22:31

Dear all

I have a script (below) that for a long time has been sending out to an
opt-in distribution list, about 100 members. Today it has stopped working
and I am not quite sure what I have changed. This is the smallest version
that still demonstrates the problem (addresses obviously changed from the
real ones):

$subject = 'Small test';

$sender = 'mailings@example.com';

$contents = "This is a short test message";


$recips = "1@example.com";
$recips .= ",\r\n 2@example.com";
$recips .= ",\r\n 3@example.com";
$recips .= ",\r\n 4@example.com";

$header='From: ' . $sender . "\r\nX-mailer: php mail()" .
"\r\nbcc: " . $recips;

echo("<h4>Header string:</h4><pre>$header</pre>");

$success = mail($sender, $subject, $contents, $header);


The symptom is that the entire "bcc: 1@example.com" line disappears,
leaving the other three addresses tacked onto the X-mailer header. Prior
to putting in that dummy line, they were attached to the To: header,
which is not much use.

If I change the Bcc: to cc: (i.e. remove just one character) then it
formats and sends perfectly as expected -- but of course, all the
addresses are visible.

I don't think it is the ISP (Linux, shared web hosting) because it
happens on my own Windows test server. Looking at my server's firewall
log, the mangling has already happened on the way out to the smtp server.

I have tried all the ways I can think of to create the $header string,
but all with the same outcome. There is no function or variable called
Bcc that could be causing substituting.

I can't think of anything I've done. Help please?

Tim F

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация