Jump to content

email coding enquiry


sungpeng

Recommended Posts

$headers = 'From: sungpeng <admin@sungpeng.com>' . "\r\n";
mail("$email", "Thank you for registration", "Dear $firstname $lastname,
Thank you for registering. Below you will find your username and password that will let you log in and begin to enter
rental listings.
Username: $email
Password: $randompass
", $headers);

 

Result

From:  myhosting@myhostingplan.com 

Sent: 28 April 2009 15: 51PM

To:  ali@msn.com

 

 

Check can myhostingplan.com change to my domain.com, in this case change to sungpeng.com?

 

Link to comment
Share on other sites

$headers = 'From: sungpeng <admin@sungpeng.com>' . "\r\n";
mail("$email", "Thank you for registration", "Dear $firstname $lastname,
Thank you for registering. Below you will find your username and password that will let you log in and begin to enter
rental listings.
Username: $email
Password: $randompass
", $headers, "-fadmin@sungpeng.com");

 

Give that a try. The 5th parameter takes the -f which sets the from at the command line level. A lot of hosts require this to be set to official change the "from" address. Granted it is still good to put it in the header as well.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.