Quote:
Originally Posted by TcM
I have my email stored as a variable in the admin panel. how do I include the -f if I will use the variable? And isn't that the from field?
|
I overlooked something, what is send_mail()? Is that a function defined by you? The mail() function accepts 5 parameters to, subject, message, headers, and send_mail parameters. The 4th parameter (the headers) is where you define the "From", using the 5th parameter with the -f argument, you can define "mailed-from."
PHP Code:
$to = 'John@codecall.net';
$subject = 'Hey';
$message = 'Hello John, Welcome to CodeCall!';
$headers = 'From: tcm@gmail.com' . "\r\n" .
'Reply-To: tcm@gmail.com' . "\r\n";
mail($to, $subject, $message, $headers, '-f{$email}');