Pradeep Elankumaran
PRADEEP.md building jo · sf

mailcheck 2.0

Some libraries get old in a good way. They do one useful thing, people copy them into their product, and then nobody needs to think about them for years.

mailcheck is one of those. Type [email protected] into an email field and it can offer [email protected]. It came out of Kicksend, my first startup in 2011. It was written by Derrick Ko, and it has been sitting in signup forms for more than a decade.

The core idea is still right. A typo suggestion should be small, obvious, and optional. The old stack around it was not. Despite 1-click sign-ins and passkeys, we’re still dealing with email forms.

I’m now signed on as a maintainer, and the new Mailcheck 2.0 is a full refresh around current tooling without making people rewrite their integrations.

A refresh, not a rewrite

Email domains got much weirder since Mailcheck first shipped. .co, .ai, .app, .io, and hundreds of other endings are real. A library that only knows a short old list can see [email protected] and “correct” it to [email protected]. That is worse than missing a typo.

Mailcheck 2.0 carries an offline snapshot of the IANA root zone with 1,438 recognized endings. That list is deliberately separate from the much smaller list of things Mailcheck will suggest as corrections. So a real ending is protected without making every possible ending a noisy suggestion target.

The default provider list now includes Proton, HEY, Fastmail, and Tuta. TypeScript declarations ship with the package. The package is tested as an actual packed dependency, including CommonJS, Node ESM interoperability, browser types, and the existing jQuery plugin.

This has always been a useful library, and foresee it will be one for as long as we have email addresses in forms.

2.0.0-beta.2 is available as a GitHub prerelease for integration testing. It is not on npm yet.

Here’s mailcheck.