View Full Version : Getting Name and No Domain on From header

04-23-2003, 03:13 AM
If I set up my email as below, I can supply a from email address. Which is great. But I would like to use just a name, instead of an email address. From: gorilla, instead of from: gorilla@codingforums.com. When I try just using the name, it seems the mail server sticks a domain on. Is there a way to do this so only name appears?

$headers = "From: ".$email_from;

mail($to, $subject, $body, $headers);

04-23-2003, 07:10 AM
I do it like that:

$name = "put your name here"
$headers = "From: $name <$email_from>";

mail($to, $subject, $body, $headers);