开发者

Changing who it is from in mail()

开发者 https://www.devze.com 2023-01-02 21:26 出处:网络
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

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消