This question already has an answer here:
//send email
$to = $_POST['email'];
$subject = "Welcome!";
$body = "Contains sensitive information that activates users so I've removed it.";
$additionalheaders = "From: <".SITEEMAIL.">
";
$additionalheaders .= "Reply-To: ".SITEEMAIL."";
mail($to, $subject, $body, $additionalheaders);
Basically the above code successfully sends an email, and in the inbox it displays as noreply@mydomain which is fine, but I've noticed that other sites show actual names. Like messages from Facebook say Facebook not noreply@facebook.com. Is there a header I am missing to accomplish this?
EDITED TO SHOW ANSWER:
//send email
$to = $_POST['email'];
$subject = "Welcome!";
$body = "Contains sensitive information that activates users so I've removed it.";
$additionalheaders = "From: Name <".SITEEMAIL.">
";
$additionalheaders .= "Reply-To: ".SITEEMAIL."";
mail($to, $subject, $body, $additionalheaders);
</div>