Welcome to WebmasterWorld Guest from 126.96.36.199
$message = "Hello $tname,<br>
$fname has requested that you take a look at the:<br>
available from WidgetWorld</a> at:<br>
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: Widgets.com <web@Widgets.com>\r\n";
$headers .= "To: ".$tname." <".$temail.">\r\n";
$headers .= "Reply-To: Widgets.com <web@Widgets.com>\r\n";
$headers .= "X-Priority: 1\r\n";
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: Widgets.com Server";
mail($temail, "From: $fname, To: $tname - $part", $message, $headers);
Ok, the mail function works like this:
mail ($to, $subject, $message, $headers)
$to = "someone <some@email>";
$subject = "You've got mail!";
$message = "Hello someone.";
$headers = "From: firstname.lastname@example.org\n"; // I suggest you try using only \n
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "Reply-To: me <email@example.com>\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: My mailer";
Hope this helps, good luck!
I suggest you try using only \n
3.1.2. STRUCTURE OF HEADER FIELDS
Once a field has been unfolded, it may be viewed as being composed of a field-name followed by a colon (":"), followed by a field-body, and terminated by a carriage-return/line-feed.
As soft laws you are not required to follow standards. There is no immediate sanction. If you decide not to follow them, you are barred from complaining that something´s not working.
Many people and even experienced people, do not even realize what a standard is or can do for them.
Brett on "Posting Code" [webmasterworld.com]
Quoting standards again ;)
But as it stands PHP won´t help you:
You must use \r\n to seperate headers, although some Unix mail transfer agents may work with just a single newline (\n).
To be on the save side you should use \x0d\x0a instead of the logical \r\n ([webmasterworld.com ]).