JSHINER Posted June 5, 2008 Share Posted June 5, 2008 $header .= "From: name@site.com\r\n"; $mailresult = mail($email,$subject,$message_body,$header); The above code puts "name@site.com" in the email - how can I get it to put "The Name" instead of name@site.com - I tried The Name (name@site.com) 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? Quote 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 <name@site.com>\r\n"; Quote Link to comment https://forums.phpfreaks.com/topic/108869-solved-email-header/#findComment-558502 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.