sendmail configuration


wongzyi
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share