feat(email): expand email client detection & add Outlook edition helper#819
Merged
Conversation
… 40+ new user agents, including Alpine, Canary Mail, FairEmail, ProtonMail Bridge, Tutanota, and The Bat! feat(helpers): added getOutlookEdition() utility to interpret raw version strings into specific Outlook editions (e.g., distinguishing Outlook 2016 MSI vs. Click-to-Run/365). chore(enums): added comprehensive BrowserName.Email enums for all newly supported clients. chore(types): added TypeScript definitions for the new getOutlookEdition helper. test(email): added comprehensive test suite covering 60+ email client user agent strings. test(helpers): added unit tests for getOutlookEdition covering Windows (MSI/C2R) and Mac variants.
chore(deps): npm vulnerability fix in package-lock.json chore: Updated dist builds
Fix comment formatting and clean up code.
faisalman
approved these changes
Jan 12, 2026
faisalman
left a comment
Owner
There was a problem hiding this comment.
Wow, this is quite a list, thanks! 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Type of Change
This PR significantly expands the library's ability to detect Email Clients (adding support for 40+ new user agents) and introduces a helper utility to distinguish between specific Microsoft Outlook editions (MSI vs. Click-to-Run vs. Mac) which have different rendering engines.
Description
1. Email Client Detection (
src/extensions/ua-parser-extensions.js)Expanded Regex: Added support for over 40 distinct email clients including Alpine, Canary Mail, FairEmail, ProtonMail Bridge, The Bat!, Tuta (Tutanota), and more.
Normalization: Implemented name normalization for fragmented User-Agents, such as Yahoo Mail, K-9 and Zimbra.
Robustness: Improved parsing for Android Mail (
Android/9-email) and clients with non-standard separators.2. Outlook Helper (
src/helpers/ua-parser-helpers.js)Added
getOutlookEdition(name, version)utility function.Why: "Outlook 16.0" is ambiguous, and most uses for parsing Outlook user agents involve email developers understanding supported email code per version. This helper analyzes the build number to distinguish between:
Outlook 2016 (MSI): Older rendering engine (no SVG support).
Outlook 2019/365 (Click-to-Run): Modern rendering engine.
Outlook for Mac: WebKit-based engine.
3. Enums (
src/enums/ua-parser-enums.js)BrowserName.Emailconstants for all newly supported clients to ensure consistent usage across the library.4. Type Definitions (
src/helpers/ua-parser-helpers.d.ts)getOutlookEdition.Test
Please describe the tests that you ran to verify your changes.
New Test Suite: Updated
test/data/ua/extension/email.jsoncovering all new User-Agents.Unit Tests: Added specific tests in
test/unit/submodules/helpers.spec.jsto verifygetOutlookEditionlogic against known Windows and Mac version strings.Verification: Verified that normalization maps correctly output standard names (e.g., "Yahoo Mail").
Impact
Does this PR introduce a breaking change? What changes might users need to make due to this PR?
No anticipated breaking changes, as this is only meant to extend existing email extension support.
Other Info