防止 HTML 电子邮件(即 Outlook)中的超链接
我们收到一些发送的 HTML 电子邮件,其中显示我们的服务已阻止的电子邮件地址。当在 Outlook 中(可能也在其他客户端中)查看电子邮件时,这些纯文本电子邮件地址会变成可单击的链接,单击后会向该地址撰写新邮件。
有没有办法防止这种情况发生?也许带有标志的元标记会阻止 Outlook 将这些内容转换为可点击的链接?
We've got some HTML emails that get sent out that show email addresses our service has blocked. When viewing the email in Outlook (and presumably in other clients as well) these plain-text email addresses get turned into clickable links that would compose a new message to this address when clicked.
Is there a way to prevent this from happening? Perhaps a meta tag with a flag that would prevent Outlook from converting these into clickable links?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
大多数电子邮件客户端会删除 META 标记、Javascript 和电子邮件不需要的其他类型的代码。 Outlook 将对您的电子邮件执行其所需的操作,因此您可能需要使用自己的锚标记包裹地址并使用空白 HREF。然后,设置链接的样式,使其看起来像文本的其余部分。
Most email clients strip out META tags, Javascript, and other types of code not necessary for email. Outlook is going to do what it wants with your email, so what you may want to do is wrap the addresses with your own anchor tag and use a blank HREF. Then, style the link to look like the rest of your text.
我认为更好的答案是制定您认为邮件客户端可能尝试生成链接的任何内容,以类似于这样的方式分解字符串: https://stackoverflow.com/a/7625887/470749
I think a better answer is to formulate anything that you think a mail client might try to generate a link for in a way that breaks up the string a bit like this: https://stackoverflow.com/a/7625887/470749
在链接中添加破折号或括号,以防止其变成超链接。
-https://www.example.com
[https://www.example.com]
Add a dash or brackets to the link to prevent it turning into a hyperlink.
-https://www.example.com
[https://www.example.com]