JSHINER Posted June 5, 2008 Share Posted June 5, 2008 $header .= "From: [email protected]\r\n"; $mailresult = mail($email,$subject,$message_body,$header); The above code puts "[email protected]" in the email - how can I get it to put "The Name" instead of [email protected] - I tried The Name ([email protected]) but it did not work. Also that puts a random space in the email above $message_body so the email sends as: " $message_body " How can I tighten it up? Link to comment https://forums.phpfreaks.com/topic/108869-solved-email-header/ Share on other sites More sharing options...
Buddski Posted June 5, 2008 Share Posted June 5, 2008 Try this for the From header $header .= "From: The Name <[email protected]>\r\n"; Link to comment https://forums.phpfreaks.com/topic/108869-solved-email-header/#findComment-558502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.