Posted by Stefan Mueller on 11/23/05 03:55
For sending an email with the PHP mail function mail() I have to create an
header like
"User" <user@inter.net>
Why am I not able to create it?
<?php
$name = "User";
$email = "user@inter.net";
$header = "From: \"$name\" <$email>";
echo $header;
?>
The result of echo $header is:
From: "User"
Why is the part <user@inter.net> missing
Stefan
PS: According to other post in the PHP newsgroup
// send email
$headers = "From: \"$name\" <$email>\n";
$subject = "Feedback Form";
$message = "$comments";
mail ("$youremail", "$subject", $message, $headers);
[Back to original message]
|