Page 1 of 1
Mail() .. Any way to change the "from" part?
Posted: Sat Jun 21, 2003 12:49 am
by Drachlen
Okay im working on sending a person an email when someone registers, but the problem is it says from:
noone@myhost.com Is there any way to change that so it matches my site? like
register@myhost.com ?? I looked at a few tutorials on it, but it seemed like they were just including the "From" part inside the message... Is it possible?
Posted: Sat Jun 21, 2003 3:06 am
by jollyjumper
Hi Drachlen,
Below is the way I use the mail function with a from email address:
Code: Select all
$ToMail = "thereceiver@somewhere.nl";
$FromMail = "register@myhost.com";
$Subject = "Example message";
$Content = "This is the content of the message\n\nGreetz Jolly";
$Header = "From: $FromMail\r\n" ."Reply-To: $FromMail\r\n";
$Sendmail = mail("$ToMail","$Subject","$Content", "$Header");
Hope this helps you.
Greetz Jolly.