
Public
Like
1
free-mail
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v15View latest version
Simple utility to check if an email address uses a free email provider.
This is useful if you want to rule out generic personal emails, like gmail, outlook, etc.
import { isFreeEmail } from "https://esm.town/v/stevekrouse/free-mail/main.ts";
await isFreeEmail("user@gmail.com"); // false (is free email)
await isFreeEmail("user@company.com"); // true (not free email)
- Loads a list of free email domains from
domains.txt - Returns
falseif the email domain is in the free domains list - Returns
trueif the email domain is NOT in the free domains list
Domain list sourced from HubSpot's blocked domains feature.