Reply to Re: mail function

Your name:

Reply:


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/

[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

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