mailintel
Open source · MIT · zero dependencies

Know what's behind any email.

Resolve the provider and the exact IMAP/SMTP settings for any address or domain — in your browser, with no API key and nothing stored.

$npm i mailintel
Read the docs
✓ no account✓ client-side✓ 16 providers
resolveready
1Parse address
2Query DNS over HTTPS
3Match provider
4Return connection

Runs in your browser · domain-only API fallback if DoH is blocked

The library

One call. The whole connection.

Everything you need to open an IMAP or SMTP session, without asking the user to look up their own server settings.

  • Known domains skip the network

    ~50 popular domains resolve from a built-in map. Zero requests.

  • Custom domains use real DNS

    MX records over HTTPS, then ~30 provider patterns, then ISPDB.

  • Cache included

    30-minute in-memory cache per instance, with a manual clear.

  • Overridable

    Domain or MX-suffix overrides for private infrastructure.

nodebundenoworkersvercelbrowser
import { mailintel } from "mailintel";

const result = await mailintel("[email protected]");

result.provider              // "google"
result.type                  // "business"
result.confidence            // "high"

result.connection.imap       // { host: "imap.gmail.com", port: 993, security: "tls" }
result.connection.smtp       // { host: "smtp.gmail.com", port: 465, security: "tls" }
result.connection.username   // "[email protected]"

Domain-only input works too, and returns a username template instead of a resolved address.

i

Username templates follow the Thunderbird convention: %EMAILADDRESS%, %EMAILLOCALPART%, %EMAILDOMAIN%.

The result

Small surface. Serious detail.

A single typed object, with enough metadata to know whether you should trust it.

30+ patterns

Provider, identified

Google, Microsoft, Zoho, Fastmail and 30+ more — including regional variants and the difference between free consumer mail and a custom domain.

ready to dial

The exact connection

IMAP and SMTP host, port, TLS mode and a username already resolved from the template. Drop it straight into your mail client config.

high / medium / low

Confidence, not guesses

Every result carries a status, a source and a confidence level, plus the raw DNS answer. When it doesn't know, it says so.

0 deps

Zero dependencies

Pure fetch. No native modules, no UDP sockets, no Node built-ins. It runs in Node, Bun, Deno, edge functions and the browser.

TypeScript

Typed end to end

One MailintelResult type covers the library, the CLI and the API. Ships ESM and CJS builds with declarations.

bring your own

You can override it

Private mail infrastructure? Add a domain or MX-suffix override and mailintel returns your settings with high confidence, no network call.

Under the hood

How a lookup resolves.

No scraping, no paid database. The routing information is public DNS; the settings come from open data.

010 requests

Parse

Split the address, normalise the domain, check the cache.

021 request

Resolve MX

Ask Cloudflare DNS over HTTPS which servers handle the domain.

030–1 request

Match

Compare the MX host against provider patterns, then ISPDB.

04typed result

Return

Map to IMAP/SMTP settings and resolve the username template.

→

A known domain like gmail.com answers from the built-in map with zero network requests. Everything else costs at most two.

Read the algorithm →
Use cases

Where this saves an afternoon.

01

Onboarding that fills itself in

When a user connects their mailbox, ask for the address and nothing else. Autofill the host, port and security before they see a settings form.

02

Mail clients and migrations

Import a list of addresses and get every connection profile at once. Works for support tooling and inbox migrations.

03

Enrichment and routing

Know whether a lead is on Google Workspace or a regional host before you sequence them — and route support tickets accordingly.

The API

Same resolver. One GET.

For scripts, agents and anything that isn't JavaScript. Free, CORS-enabled and no key required.

GET /api/lookup
$ curl "mailintel.atef.dev/api/[email protected]"

{
  "provider": "google",
  "providerDisplayName": "Google Workspace",
  "connection": {
    "imap": { "host": "imap.gmail.com", "port": 993 },
    "smtp": { "host": "smtp.gmail.com", "port": 465 }
  },
  "confidence": "high"
}
no keyCORS open60 req / minJSON
API reference →
Questions

The honest answers.

Is it really free?+

Yes. The library is MIT and the hosted API is free under a fair-use limit of 60 requests per minute per IP. Run the library in your own app and there is no limit at all.

Do you store the addresses people check?+

No. The playground resolves in your browser, so the local part never leaves your device. If your network blocks DNS-over-HTTPS, the fallback sends the domain only. Counters are aggregate — domain, provider and outcome — never the local part or the full address.

How accurate is provider detection?+

It is derived from public DNS MX records, so the routing is real. The settings are accurate for the providers in the dataset; the caveats are about authentication, not hosts — Microsoft 365 needs OAuth2, and Google, Yahoo and iCloud need app passwords.

Can it tell if an address is disposable?+

It flags domains on a curated temporary-email list as a heuristic. That is a signal, not a probability and not mailbox verification — a domain can disappear, and a real person can use one. Use it to add friction, never as the only reason to reject someone.

Does it work with custom domains?+

That is the point. A domain on Google Workspace or Microsoft 365 points at the same MX infrastructure as the consumer product, so mailintel detects it without being told. Truly private mail servers fall back to Thunderbird's ISPDB or return `unknown-provider`.

Can I self-host the API?+

Yes. The site is a Next.js app with the library as its only resolver. Clone the repo, run it, point mailintel.atef.dev wherever you like. The lookup route has no database dependency.

Start in one line

Stop asking users for their mail server.

Install the library, try the playground, or point your agent at the API. All three use the same resolver.

$npm i mailintel
Read the docs
16 providers documented·MIT licensed·github.com/AhmedAtef07/mailintel