douyoufan7881 2018-06-05 15:36
浏览 352
已采纳

如何防止在Gmail邮件中显示超链接

I am sending emails to gmail account. The message has a link. I'd like the link does not show up. Below is the part of the message. Gmail will show this part as it is, but I'd like gmail shows as Please ***click here*** to upload your application form.

Please <a href='http://www.mywebsite.com'>click here </a> to upload your application form.

Thanks.

  • 写回答

2条回答 默认 最新

  • douqun1977 2018-06-05 20:13
    关注

    The issue here might be because of missing headers for content type. Look at the following example:

    $to = 'test@test.com';
    
    $subject = 'PHP Mail Sending';
    
    $headers = "From: scripts@email.com 
    ";
    $headers .= "Reply-To: no-reply@email.com 
    ";
    $headers .= "MIME-Version: 1.0
    ";
    $headers .= "Content-Type: text/html; charset=UTF-8
    ";
    
    $message = '<p>Hello, this is to check PHP mail function</p>';
    
    mail($to, $subject, $message, $headers);
    

    In above code, the line $headers .= "Content-Type: text/html; charset=UTF-8 "; tells the mailer and the recipient that the email contains are well formed HTML

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部