Re: mail() Bcc:

From: Date: Tue, 25 Mar 2003 11:28:13 +0000
Subject: Re: mail() Bcc:
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-140936@lists.php.net to get a copy of this message
John, et al -- One more nit to add to this... ..and then CPT John W. Holmes said... % .. % % You can do it like this: % % $headers = "From: me@mydomain.com\r\nCC: you@yourdomain.com\r\nBCC: % them@theirdomain.com"; Yes, figuring that the added line break is just because of a dumb mail program :-0 % % or % % $headers = "From: me@mydomain.com % CC: you@yourdomain.com % BCC: them@theirdomain.com"; This can get you into trouble because it isn't portable. Mail headers are supposed to end in return (\r) *and* newline (\n) but all you're doing here is saying to "insert the end-of-line sequence for this operating system". If you're on a windows box you're fine (though you have a myriad of other problems ;-) but if you're on a *NIX box you're only sending newline and if you're on a Mac you're only sending return (I don't know enough Mac to know if an OS X Mac has newlines like a classic Mac or like a *NIX box). Use the all-run-together format or a .= buildup and manually specify the needed \r\n to avoid the headache. HTH & HAND :-D -- David T-G * There is too much animal courage in (play) davidtg@justpickone.org * society and not sufficient moral courage. (work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

« previous php.general (#140936) next »