How to change header "from" sending mail
I use this method to send a mail on my website :
$message="Hello";
$headers='From: info@hosting.com'."\r\n".'Reply-To: info@hosting.com'."\r\n".'X-Mailer: PHP/'.phpversion();
ma开发者_JS百科il("destination@mail.com", "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
Use this header instead: From: "My Website Hosting" <info@hosting.com>
精彩评论