【问题标题】:Email links in Yahoo mail removing href attribute and live.com adding https雅虎邮件中的电子邮件链接删除 href 属性和 live.com 添加 https
【发布时间】:2014-04-08 11:42:21
【问题描述】:


在我的应用程序中遇到电子邮件 URL 的问题。我通过电子邮件向用户发送用于共享文件的链接。这些链接是我的应用程序上的登录页面,它对用户进行身份验证。现在电子邮件中的链接 在不同的邮件中表现不同供应商。Google 以正确的方式做到这一点,即我的链接在 Google 中显示并正常工作。
最糟糕的是雅虎。它从链接中完全删除了href 属性。这是在检查萤火虫控制台中的链接之后。

<a style="color:#333;padding-left:3px;padding-right:10px;text-decoration:none;font-family:'Segoe UI', Tahoma, Verdana, Arial, Sans-Serif;font-size:10pt;" rel="nofollow" id="yui_3_13_0_1_1396955520023_2240">links.txt</a>

它添加了可能导致问题的rel=nofollow。但我不知道为什么会发生这种情况,通过网络但发现其他人面临同样的问题,但没有有效的解决方案。
我的链接是这样的http://www.abc.com/authenticate.php?id=YLZr4Sj3MjAxNw==&amp;pid=K4mfnbCyMQ==&amp;auth=Iu8Yi2er 这没有任何可能导致问题的特殊字符。

Live.com :这会将https:// 协议添加到链接而不是http:// 我建立的链接是http,但它在内部添加了https,这是我不想要的。

任何遇到过类似问题的人,我想就这个问题提供一些意见和指导。

干杯!

【问题讨论】:

    标签: php email hyperlink windows-live yahoo-mail


    【解决方案1】:

    确保您没有遗漏http:// 协议前缀。您的 &lt;a&gt; 标记应采用以下格式: &lt;a href="http://www.abc.com"&gt;abc.com&lt;/a&gt;

    我使用了您的链接。雅虎邮箱没有任何问题。

    【讨论】:

    • 链接是动态添加到邮件中的,正如我提到的,href 属性的电子邮件条。静态链接可以正常工作。
    • 你遇到过这个问题吗?我现在也面临着类似的困境。
    • 是的@Archie22is。这个解决方案解决了我的问题。
    【解决方案2】:

    感谢您的回答。我在代码中使用了以下 html 集:

     # send the email to Applicant
    $to = $application['myemail'];
    $subject = 'Mentorship Registration Form';
    $headers = "From: xxx@domain.com " . "\r\n";
    $headers .= "Reply-To: ".  $application['myemail'] . "\r\n";
    $headers .= "CC: zzz@domain.co.za, ccc@domain.co.za\r\n";
    $headers .= "MIME-Version: 1.0\r\n";
    $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
    $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
            <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                <title></title>
                <style></style>
            </head>
            <body>';
    $message .= '<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="color:#FFFFFF;background:#b4b4b4;padding:5px 0 0 0;">
            <tr>
    

    【讨论】:

      【解决方案3】:

      我遇到了类似的问题,然后我只是在电子邮件正文中使用了stripslashes(),它工作得非常好

      $body= stripslashes($mail_message);
      

      【讨论】:

      • stripslashes() 是什么?
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-30
      相关资源
      最近更新 更多