有没有人想出一种方法来检测收件人正在使用的电子邮件程序?

发布于 2024-12-07 12:36:00 字数 114 浏览 1 评论 0原文

我知道有一些方法可以根据 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

_蜘蛛 2024-12-14 12:36:00

我不明白这怎么可能。浏览器检测是通过 Javascript(而不是 CSS)完成的。如果用户使用非基于 Web 的电子邮件客户端(例如 Outlook),单击链接将触发默认浏览器打开并加载该链接。浏览器发送到您的服务器的信息将不知道是什么应用程序导致浏览器启动。

我认为您唯一的选择是为每个客户提供不同的链接,并依靠用户的善良来单击正确的链接。

我还认为,根据单击链接后可用的几个因素,您猜测客户端的成功率相当高,例如:

  • 设备类型
  • 浏览器 操作系统
  • 电子邮件
  • 地址(如果是 gmail.com 或hotmail.com,您知道 99% 的人使用 Web 客户端 - 或者为了更好的匹配,将其与设备类型混合)

然后您可以进行概括,例如:

  • 从 Windows 访问,而不是 gmail/hotmail/yahoo Webmail 地址 - 可能使用过前景
  • 从 OSX 而不是 Web 邮件地址访问 - 可能使用
  • 从任一地址和 Web 邮件地址访问的邮件 - 可能使用

类似的浏览器规则可能会给您一些非常有意义的统计数据。

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:

  • The device type
  • The Browser
  • The Operating System
  • The email address (if it's gmail.com or hotmail.com you know 99% of them used the web client - or for a better match mix it with the device type)

Then you could make generalisations such as:

  • Accessed from Windows and not a gmail/hotmail/yahoo webmail address - probably used Outlook
  • Accessed from OSX and not webmail address - probably used Mail
  • Accessed from either and a webmail address - probably used Browser

Rules like that could probably give you some pretty meaningful statistics.

滿滿的愛 2024-12-14 12:36:00

如果您面临的挑战是查看此人正在使用什么电子邮件客户端,那么有比显示和隐藏链接更简单的解决方案。最简单的方法是嵌入图像,向其中添加查询字符串,如下所示:

http://www.yoursite.com/[email protected]

然后您将捕获此服务器端并获取用户代理字符串。

问题在于 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:

http://www.yoursite.com/[email protected]

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文