Skip to content

thesash/email-validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

email-validator

Fast, local email validation for CLI use.

Deliverability here means: valid syntax and the domain has MX records (or A/AAAA records if no MX records exist). This is cheap, fast, and reliable without contacting mail servers.

Optional SMTP mailbox checks are available, but can be slow and may return false negatives because many servers block or greylist probes.

Install

cd /Users/sash/p/email-validator

make build

Or install to your Go bin:

make install

Usage

Single address:

./email-validator test@example.com

From a CSV file:

./email-validator --input users.csv --format csv --column email

From Markdown:

./email-validator --input list.md --format md

From stdin:

cat emails.txt | ./email-validator

Output formats:

./email-validator --input users.csv --output json

SMTP checks (optional):

./email-validator --input users.csv --smtp

Output fields

  • valid: syntax-only check
  • deliverable: DNS deliverability (or SMTP mailbox check when --smtp is set)
  • reason: mx, a/aaaa, smtp-accepted, smtp-rejected, no-mx-or-a, etc.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published