Changing the sender in the mail() function

the mail() function

Moderators: egami, macek, gesf

Post Reply
User avatar
Redcircle
Moderator
Moderator
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Wed Feb 05, 2003 4:10 pm

the from address is defined in the header. example

Code: Select all

$fromName = "from"; 
$fromEmail = "from@metoyou.com";

$toName = "recipient";
$toEmail = "to@metoyou.com";

$message = "This is a test";
$subject = "testing email";

$headers = "From: ".$fromName." <".$fromEmail.">\r\n";

mail($toEmail, $subject, $message, $headers);

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest