I am making an email form but from which email address is the mail sent?
Thanks!
Advertisement
Answer
from whatever email adress you specify as sender:
bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )
for headers, you can add:
$additional_headers.= "From: foo@bar.com";
But help yourself and use PHPMailer along with a well configured, dedicated SMTP-Server to send mails: https://github.com/PHPMailer/PHPMailer
(You’ll run into lot of issues otherwhise)