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条)

报告相同问题?

悬赏问题

  • ¥15 使用MATLAB进行余弦相似度计算加速
  • ¥15 服务器安装php5.6版本
  • ¥15 我想用51单片机和数码管做一个从0开始的计数表 我写了一串代码 但是放到单片机里面数码管只闪烁一下然后熄灭
  • ¥20 系统工程中,状态空间模型中状态方程的应用。请猛男来完整讲一下下面所有问题
  • ¥15 我想在WPF的Model Code中获取ViewModel Code中的一个参数
  • ¥15 arcgis处理土地利用道路 建筑 林地分类
  • ¥20 使用visual studio 工具用C++语音,调用openslsx库读取excel文件的sheet问题
  • ¥100 寻会做云闪付tn转h5支付链接的技术
  • ¥15 DockerSwarm跨节点无法访问问题
  • ¥15 使用dify通过OpenAI 的API keys添加OpenAI模型时报了“Connection Error”错误