Jump to content

email coding enquiry


sungpeng

Recommended Posts

$headers = 'From: sungpeng <[email protected]>' . "\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:  [email protected]

 

 

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

 

Link to comment
https://forums.phpfreaks.com/topic/155947-email-coding-enquiry/
Share on other sites

$headers = 'From: sungpeng <[email protected]>' . "\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, "[email protected]");

 

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
https://forums.phpfreaks.com/topic/155947-email-coding-enquiry/#findComment-821069
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.