How to display name in the from address?
I have a site in PHP.In this when I send the invitation to people it takes the from address as mysitename@servername.Instead of this I want o display the Mysitename .How can I do.I have the code shown below.
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To:'. $value . "\r\n";
$headers .= 'From:Mysitename'."\r\n";
How can I show like in users em开发者_如何学Cail's from address is Mysitename?
Thanks in advance?
$headers .= 'From: Mysitename <mysitename.com>' . "\r\n";
http://php.net/manual/en/function.mail.php
Maybe something along the lines of:
$headers .= 'From: Mysitename <owner@mysitename.com>' . "\r\n";
You need 'From' to be proper email address.
精彩评论