如何更改标题“来自”发送邮件
我使用此方法在我的网站上发送邮件:
$message="Hello";
$headers='From: [email protected]'."\r\n".'Reply-To: [email protected]'."\r\n".'X-Mailer: PHP/'.phpversion();
mail("[email protected]", "Title", $message, $headers);
但是当我收到邮件时,字段 From
被写入 info
。
我怎样才能改变它?例如我的网站托管
I use this method to send a mail on my website :
$message="Hello";
$headers='From: [email protected]'."\r\n".'Reply-To: [email protected]'."\r\n".'X-Mailer: PHP/'.phpversion();
mail("[email protected]", "Title", $message, $headers);
but when I receive it, the field From
is written as info
.
How can I change it? Such as My Website Hosting
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请改用此标头:
From: "My Website Hosting" <[电子邮件受保护]>
Use this header instead:
From: "My Website Hosting" <[email protected]>