Changing who it is from in mail()
I'm sending myself a 开发者_如何学Pythontext message using PHP mail()
and it says FRM: username@myftpaddress.com
. I'm using number@txt.att.net
to send the text message. How can I change that?
You can add additional headers to the mail function, including from
:
$headers = "From: your@email.com\n";
mail($to, $subject, $body, $headers);
精彩评论