douyoufan7881 2018-06-05 23: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-06 04: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条)

报告相同问题?

悬赏问题

  • ¥20 管道轴向耦合水击问题
  • ¥60 补全networkx TODO部分。
  • ¥15 有内推吗,云计算linux运维方向
  • ¥30 sort cuteSV.vcf by bcftools用IGV可视化出现报错
  • ¥100 SOS!对STK中导出的天体图像进行质心提取有没有人做过啊
  • ¥15 python 欧式距离
  • ¥15 运行qteasy报错
  • ¥15 遗传算法解决有工序顺序约束的大规模FJSP问题
  • ¥15 企业消防水炮塔设计方案
  • ¥20 WORKBENCH网格划分