邮件客户端检测 [英] Email client detection

查看:119
本文介绍了邮件客户端检测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目向终端客户发送一些电子邮件。我的客户需要知道他们用来阅读邮件的是什么电子邮件客户端。我知道一个隐藏的可以获取开放事件,甚至可以使用他们使用的用户代理,所以通过解析用户代理,我可以获得大多数电子邮件客户端信息。



但是很难检测一些流行的邮件客户端,如Gmail,Hotmail和雅虎邮件。因为用户代理返回只是浏览器用户代理字符串。



编辑:我想我需要一个更像这样的结果:
here

解决方案

你会不能完美地检测您的用户正在使用的电子邮件客户端。



在电子邮件标题中,一些程序选择包括 X- Mailer 标签,它告诉您您的用户正在发送电子邮件的程序和版本 - 当然可以伪造。并非所有程序都使用 X-Mailer 标签,例如在与Microsoft Outlook 2010发送的邮件中找不到。



此外,您可以从中收到的猜测$ c>标签,但最终您可以使用SMTP和POP3与大多数webmail,如GMail或Yahoo。这意味着即使您的电子邮件是通过google.com的服务器发送的,始发客户端仍然可以是Outlook或Thunderbird,而不是GMail本身。



也许我们可以帮助如果你能更好地告诉我们您的客户为什么要知道用户用来阅读邮件的程序,那么你呢?可能调整通讯的外观?


I have a project to send some email to end clients. My client need to know what exactly "Email Client" they use to read the mail. I know a hidden can get the open event and even the user agent they use, so by parsing user agent i can get most email clients info.

But it's hard to detect some popular web mail clients like "Gmail", "Hotmail" and "Yahoo mail". Because user agent return is only the browser user agent string.

Edit: i think i need a result more like this: here

解决方案

You will not be able to perfectly detect the e-mail client your users are using.

In E-Mail headers some programs choose to include the X-Mailer tag, which tells you exactly with what program and version your user is sending the e-mail - of course that can be faked. Not all programs use the X-Mailer tag, I e.g. couldn't find it in a mail sent with Microsoft Outlook 2010.

Besides that you could do some guesswork by the Received from tag in the e-mail headers, but in the end you can use SMTP and POP3 with most webmailers like GMail or Yahoo. That means even though your e-mail is sent via servers from google.com, the originating client could still be Outlook or Thunderbird and not GMail itself.

Maybe we can help you if you better if you could tell us why exactly your client wants to know the programs the users use to read their mail? Probably to tune the appearance of newsletters?

这篇关于邮件客户端检测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆