|
Posted by Manuel Lemos on 04/11/06 19:19
Hello,
on 04/10/2006 01:29 AM James said the following:
> 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);
You are a bit confused. The header that Anonymous Access User
<nobody@....> is From , not From: . Note the missing colon.
The From header is generated by your mail server automatically. Usually
it sets it to the return path address. The way that address is set
depends on your platform. You may want to try this class that figures
automatically how to set the return path address:
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Navigation:
[Reply to this message]
|