ua-parser-js icon indicating copy to clipboard operation
ua-parser-js copied to clipboard

Including email clients?

Open bradvogel opened this issue 7 years ago • 7 comments

I noticed this library isn't parsing user agents for email clients. Would you be open to us submitting PRs to handle them?

One example:

$ node
> var parser = require('ua-parser-js');
undefined
> parser('Microsoft Office/16.0 (Microsoft Outlook Mail 16.0.8104; Pro)')
{ ua: 'Microsoft Office/16.0 (Microsoft Outlook Mail 16.0.8104; Pro)',
  browser: { name: undefined, version: undefined, major: undefined },
  engine: { version: undefined, name: undefined },
  os: { name: undefined, version: undefined },
  device: { model: undefined, vendor: undefined, type: undefined },
  cpu: { architecture: undefined } }
> 

More: Spark/1.7.3.948 CFNetwork/811.4.18 Darwin/16.5.0 Superhuman Airmail%203/420 CFNetwork/811.4.18 Darwin/16.5.0 (x86_64)

bradvogel avatar Apr 14 '17 18:04 bradvogel

Hi bradvogel,

I think this would be great! Based on this site: http://thadafinser.github.io/UserAgentParserComparison/v5/user-agent-detail/aa/82/aa82eef8-8f4d-4f60-b6c5-dc7a477666f0.html there are currently 2 things that can be derived (by some parsers):

  • The Browser name is "Outlook 2016"
  • The device type is "Desktop"

I can follow the outlook 2016 part, but i'm not sure how other parsers come up with "Desktop". In addition the browser version could be added (here: 16.0.8104)

What do you think?

ebbmo avatar Jun 20 '17 21:06 ebbmo

I think "Microsoft Office" is always Desktop.

bradvogel avatar Jun 20 '17 21:06 bradvogel

Are you certain? I haven't tested any MS Apps on Android or iPhone, so I don't know what kind of UA they send when I click on a link there... They could be using an InApp Browser like Facebook too, and that may as well contain MS Office... Do you have a way of testing it?

ebbmo avatar Jun 20 '17 21:06 ebbmo

No, I'm not. I unfortunately don't have an easy way to test

bradvogel avatar Jun 20 '17 21:06 bradvogel

Ok. So there is a bit of "Google" involved to find out whether your assumption is correct ;) Do you mind to open a PR for the MS Outlook recognition?

KR, ebbmo

ebbmo avatar Jun 20 '17 21:06 ebbmo

Please check also Outlook Client for MacOS, its browser type is shown as "Webkit/603.3.8".

markb-trustifi avatar Feb 15 '18 11:02 markb-trustifi

Just wondering if any progress has been made on this? It'd be good to also parse Office versions too.

e.g 1 Outlook user agent:

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Microsoft Outlook 16.0.9126; Microsoft Outlook 16.0.9126; ms-office; MSOffice 16)

ua-parser-js: IE 7 on Windows 10 whatismybrowser.com: Outlook 16 on Windows 10


e.g 2 MS Word user agent:

Microsoft Office/16.0 (Windows NT 10.0; Microsoft Word 16.0.11001; Pro)

ua-parser-js: Unknown on Windows 10 whatismybrowser.com: Word 16 on Windows 10

glennzw avatar Jul 30 '20 22:07 glennzw