邮件客户端检测 [英] Email client detection
问题描述
但是很难检测一些流行的邮件客户端,如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屋!