You are here: Re: what is wrong with this mail script « PHP Programming Language « IT news, forums, messages
Re: what is wrong with this mail script

Posted by Ken Robinson on 10/21/01 11:25

"yoelgold@yahoo.com" <yoelgold@yahoo.com> wrote in
news:1125523135.041204.139310@g14g2000cwa.googlegroups.com (in part):

> $msubject = "Price Change";
> $tomail = "yoelg...@yahoo.com";
> $mfrom = "From: Baltimore Trails <i...@baltimoretrails.com>\r\n";
> $mbody = "text....asdfasdfasdfasdfasdfasdf";
> $bcchead1 = "Bcc: i...@baltimoretrails.com\r\n";
> $bcchead2 = "Bcc: yoelg...@baltimoretrails.com\r\n";
> $header = "$mfrom $bcchead1 $bcchead2";
> mail($tomail, $msubject, $mbody, $header);
> -------------------------------------------------------
>
> this is what yoelg...@baltimoretrails.com email looks like:
> the From field in MS outlook = "Baltimore Trails Bcc:
> yoelg...@baltimoretrails.com"
> and the To: field = "yoelg...@yahoo.com"

Try this instead:

msubject = 'Price Change';
$tomail = 'yoelg...@yahoo.com';
$mfrom = 'From: Baltimore Trails <i...@baltimoretrails.com>'."\r\n";
$mbody = "text....asdfasdfasdfasdfasdfasdf";
$header = $mfrom;
$header .= 'Bcc: i...@baltimoretrails.com';
$header .= ',yoelg...@baltimoretrails.com'."\r\n";

Your original way of creating the header put spaces in the string which
probably messed up the email headers. Also, the addresses in the BCC
header should be separated with commas.

Ken

 

Navigation:

[Reply to this 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

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