将邮件发送到 gmail 时,带有 href 的锚标记作为 http 以外的锚标记不起作用

anchor tag with href as other than http is not working while sending mail to gmail

我正在使用 smtp sendmail 函数,在锚 <a> 标签 href 属性中我们有除 http:// 以外的参考,即如下所示

transauth://some other data 

但是 gmail 没有创建 transauth 超链接 ,而是创建了 http://gmail.com,关于这个的任何解决方案。

Gmail 去除使用自定义 uri 模式的链接。

但是,如果您在某个地方有一个网站,您可以托管一个简单的重定向页面,将您重定向到正确的架构。

这是我从 this answer to another question

复制的非常防弹的重定向
<!DOCTYPE HTML>
<html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1;url=http://example.com">
        <script type="text/javascript">
            window.location.href = "http://example.com"
        </script>
        <title>Page Redirection</title>
    </head>
    <body>
        <!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
        If you are not redirected automatically, follow the <a href='http://example.com'>link to example</a>
    </body>
</html>