the mail() function
3 posts • Page 1 of 1
I have read the documentation about how to use the mail() function. my problem is that I can't change the sender parameter. Is there a way to change it? Or is there a module or function where I can use dynamic mail() senders? We have our own Apache server.
the from address is defined in the header. example
Code: Select all
$fromName = "from";
$fromEmail = "email@example.com";
$toName = "recipient";
$toEmail = "firstname.lastname@example.org";
$message = "This is a test";
$subject = "testing email";
$headers = "From: ".$fromName." <".$fromEmail.">\r\n";
mail($toEmail, $subject, $message, $headers);
Thanks, RedCircle, but that's not what I mean. That header appears only inside the body of the email that will be sent. The sender parameter that I'm refering to is the sender that will appear in the inbox of my emails destination, not the body of the email.
Who is online
Users browsing this forum: No registered users and 1 guest