有没有人想出一种方法来检测收件人正在使用的电子邮件程序?
我知道有一些方法可以根据 CSS 规则检测浏览器,但我不知道同样的技巧是否适用于 Outlook。我认为它的工作方式是使用 CSS 规则来显示和隐藏 url,以便当收件人单击链接时我可以知道它来自哪个电子邮件程序。
I know there are ways to detect browsers based on CSS rules but I don't know if the same tricks would work for Outlook. The way I think it could work is have CSS rules that show and hide urls so that when a recipient clicks on a link I can tell which email program it came from.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不明白这怎么可能。浏览器检测是通过 Javascript(而不是 CSS)完成的。如果用户使用非基于 Web 的电子邮件客户端(例如 Outlook),单击链接将触发默认浏览器打开并加载该链接。浏览器发送到您的服务器的信息将不知道是什么应用程序导致浏览器启动。
我认为您唯一的选择是为每个客户提供不同的链接,并依靠用户的善良来单击正确的链接。
我还认为,根据单击链接后可用的几个因素,您猜测客户端的成功率相当高,例如:
然后您可以进行概括,例如:
类似的浏览器规则可能会给您一些非常有意义的统计数据。
I can't see how this would be possible. Browser detection is done via Javascript (not CSS). And if the user is using a non-web-based email client (such as Outlook), clicking on a link will trigger the default browser to open and load the link. The information the browser sends to your server will have no knowledge of what application caused the browser to launch.
I think your only option would be to have different links for each client and rely on the goodness of the users to click the correct link.
I also think you'd have a fairly high success rate of guessing the client based on a few factors that ARE available after the link is clicked such as:
Then you could make generalisations such as:
Rules like that could probably give you some pretty meaningful statistics.
如果您面临的挑战是查看此人正在使用什么电子邮件客户端,那么有比显示和隐藏链接更简单的解决方案。最简单的方法是嵌入图像,向其中添加查询字符串,如下所示:
然后您将捕获此服务器端并获取用户代理字符串。
问题在于 GMail 和 Hotmail 等网络邮件客户端。在这些情况下,用户代理字符串将与 Web 浏览器相同。在这里,您可以通过检查电子邮件地址来检测用户的网络邮件客户端,例如。 hotmail.com。
存在一些边缘情况,例如 Google Apps for Business,但这应该可以解决大多数情况。
大多数电子邮件发件人(例如 Mailchimp)都会为您进行邮件客户端分析。
If your challenge is to see what email client the person is using, there are simpler solutions than showing and hiding links. The easiest way would be to embed an image, add a query string to it like so:
You would then catch this serverside and get the user agent string.
The issue with this is with webmail clients like GMail and Hotmail. In these instances the user agent string would be the same as the web browser. Here you would detect the user's webmail client by inspecting the email address, eg. hotmail.com.
There are edge cases such as Google Apps for Business, but this should catch most cases.
Most email senders such as Mailchimp will do mail client analytics for you.