You are here: Re: mail function « All PHP « IT news, forums, messages
Re: mail function

Posted by Wog George on 04/10/06 08:01

"James" <null@null.com> wrote in message
news:4439df16$1@dnews.tpgi.com.au...
> Why don't the headers work all i get is From: NFS Anonymous Access User
> <nobody@....>
>
> $email=$_POST["email"];
> $name=$_POST["name"];
>
> $subject= "mail";
> $message="Text";
>
>
> $headers = "MIME-Version: 1.0 . \r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1'\r\n";
> $headers .= "To: $name <$email> \r\n";
> $headers .= 'From: Webmaster <webmaster@example.com> \r\n";
> $headers .= "Cc: \r\n";
> $headers .= "Bcc:\r\n";
>
>
>
> mail($email,$subject,$message,$header);
>
>
The problem could be here...

$headers .= 'From: Webmaster <webmaster@example.com> \r\n";

I notice that you open the value with a single quote and close it with a
double quote, which probably means it's still looking for the end of the
string ie the closing single quote. I'd suggest that you use a double quote
like all the other lines where you set the $headers variable. I'm actually
surprised that it didn't complain of an error somewhere not too far after
that line.

--
George
"If we're still alive in the morning then we'll know we're not dead" - Randy
Marsh - 5 April 2006

 

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

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