开发者

Customizing the from field in the mail sent from php mail function

Im using the following code to send mail from my php script running on my ubuntu server.

$to = "<receipients_email_id_here>";
$subject = "Hello";
$txt = "<Message Body>";
$headers = "From: Site Name <jims@mysite.com>\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";

if(mail($to,$subject,$txt,$headers)){
    print "Sent";
}
else
{
    print "Failed";
}

When user receives the mail he sees "Site Name <jims@mysite.com>" in the from fiel开发者_StackOverflowd. I would like the from field to just show "Site Name" and also i want to add a hyperlink to it to point to my website. Is this possible to do from the php code ?

Please Help Thank You


I think this is related to the settings on the receiver's client software.


Agree with @Ahmad Hajjar and I think hiperlink it's not possible or spammers will love it!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜