简体   繁体   English

如何防止电子邮件客户端自动添加tel:标签

[英]How to prevent email clients from automatically adding tel: tag

I am trying to send a form by email to a site admin, I am using the PHP library 'SwiftMailer' 我正在尝试通过电子邮件将表单发送给站点管理员,我正在使用PHP库“ SwiftMailer”

It is meant to send user information including his / her IP address and some URLs, when the email arrives in the inbox of Gmail and other email clients the URL automatically becomes an anchor link and I had to work around this by adding span tags like: 它旨在发送用户信息,包括他/她的IP地址和一些URL,当电子邮件到达Gmail和其他电子邮件客户端的收件箱时,URL自动成为锚链接,我不得不通过添加以下跨度标签来解决此问题:

< span > ht < /span> tp: < span > // < /span> and so on <span> ht </ span> tp:<span> // </ span>依此类推

and it worked and gmail displays the URL as text, not a clickable anchor 并且有效,并且gmail将URL显示为文本,而不是可点击的锚点

now when i send the visitor's IP, the mail client is adding tel:ip if i send 127.0.0.1 it shows up tel:127.0.0.1, clickable and Skype is running when clicked 现在,当我发送访问者的IP时,如果我发送127.0.0.1,则邮件客户端会添加tel:ip,它会显示tel:127.0.0.1,可单击,当单击时Skype正在运行

The spans trick isn't working for this 跨度技巧对此不起作用

any suggestions? 有什么建议么? thanks 谢谢

I had a similar issue where a series of numbers is getting turned into a tel: link even though it is not a phone number. 我遇到了类似的问题,即使不是电话号码,一系列数字也变成了tel:链接。 I added this meta tag to the head section: 我将此meta标签添加到head部分:

<meta name="format-detection" content="telephone=no">

Here is the article that helped me out. 这是对我有帮助的文章。

Just remember that if your email DOES have phone numbers in it, you will now have to specify the links for those in order to provide your mobile users to call it from the email. 请记住,如果您的电子邮件中确实包含电话号码,那么您现在必须指定这些链接,以使您的移动用户可以通过电子邮件对其进行呼叫。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM