wongzyi Posted February 21, 2011 Report Share Posted February 21, 2011 Hi all, i am a newbie at hawkhost. I am using the mail() function in my php script to generate auto reply to user when they sign up at my site. What i should configure to change the sender email at the receiving end? As the sender email shown at the user end is something like [email protected].. I would like to change the address to something else.. anybody can help me? hishMaist 1 Quote Link to comment Share on other sites More sharing options...
Cody R. Posted February 21, 2011 Report Share Posted February 21, 2011 Hi all, i am a newbie at hawkhost. I am using the mail() function in my php script to generate auto reply to user when they sign up at my site. What i should configure to change the sender email at the receiving end? As the sender email shown at the user end is something like [email protected].. I would like to change the address to something else.. anybody can help me? Simply set the mail headers $to = "[email protected]"; $subject = "Some awesome subject"; $message = "Some body"; $headers = "From: [email protected] \r\n"; $headers .= "Reply-To: [email protected] \r\n"; mail($to, $subject, $message, $headers); [/code] Take a peak at the mail() function page on php.net Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.