Architecture · Zero-Network Geolocation
How does smart-mailto choose regional providers?
smart-mailto uses browser timezone and language signals to order regional providers. It does not use IP lookup, cookies, or network requests for this detection.
How It Works
1. Collect Signals
Two browser APIs, zero network:
Intl.DateTimeFormat().resolvedOptions().timeZone— IANA timezone string (e.g.,Europe/Moscow)navigator.language— BCP 47 language tag (e.g.,ru-RU)
2. Map to Region
Timezone is matched against a curated map of 180+ timezone entries:
- Europe/Moscow → ru (Russia/CIS)
- Asia/Tokyo → jp (Japan)
- America/New_York → us (United States)
3. Order Providers
Each region maps to a prioritized provider list:
- Russia → Yandex, Mail.ru, Rambler, Gmail
- Japan → Yahoo! Japan, iCloud, Gmail, docomo
- Germany → GMX, WEB.DE, T-Online, Gmail
4. Fallback Chain
Resolution order when no geo signals are available:
- Custom providers (injected by user)
- Persisted preference (localStorage)
- Email domain detection
- preferredProvider override
- Geo-ordered default list
Timezone Coverage
smart-mailto maps 180+ IANA timezones to 20+ regional provider configurations. Coverage prioritizes regions with strong local email providers:
Russia / CIS
Timezones: Europe/Moscow, Asia/Yekaterinburg, ...
Providers: Yandex, Mail.ru, Rambler
Japan
Timezones: Asia/Tokyo, Asia/Seoul
Providers: Yahoo! Japan, iCloud, docomo
Germany
Timezones: Europe/Berlin, Europe/Vienna
Providers: GMX, WEB.DE, T-Online
France
Timezones: Europe/Paris
Providers: SFR, Free, Orange, La Poste
Poland
Timezones: Europe/Warsaw
Providers: Onet, WP, O2, Interia
China
Timezones: Asia/Shanghai, Asia/Hong_Kong
Providers: QQ, 163, Alibaba
India
Timezones: Asia/Kolkata
Providers: Gmail, Rediff, Zoho
South Korea
Timezones: Asia/Seoul
Providers: Naver, Kakao, Nate
Brazil
Timezones: America/Sao_Paulo, ...
Providers: Gmail, Outlook
Privacy & Performance
Zero Network Requests
Unlike IP geolocation services that send user data to third-party servers, smart-mailto computes location entirely in-browser. No cookies, no beacons, no external API calls. The user's location never leaves their device.
Sub-Millisecond Runtime
The entire geo detection pipeline — signal collection, region mapping, and provider ordering — completes in under 1ms. There is no impact on page load or click response times.
API Reference
Two functions control geo detection:
collectGeoSignals()
{
timeZone: string; // e.g. "Europe/Moscow"
locale: string; // e.g. "ru-RU"
locales: string[]; // prioritized language tags
isMobile: boolean;
isIOS: boolean;
isAndroid: boolean;
}detectRegionLabel(signals)
Converts geo signals to a human-readable region label:
Europe/Moscow → Russia/CIS
Asia/Tokyo → Japan
America/New_York → Global
Asia/Kolkata → IndiaFor the complete API reference, visit the Technical Specs page.