我正在使用 smtp 发送邮件功能,在 anchor <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>
关于email - 将邮件发送到 gmail 时,带有 href 的 anchor 标记作为 http 以外的 anchor 标记不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34177182/