Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📧 Gmail Address Validator

Standalone Node.js CLI tool that validates Gmail addresses to confirm they are real and deliverable. Built for campaign lead verification to eliminate bounces before sending.

No npm install required — single file, runs anywhere Node.js is installed.


🖥️ Preview

Script Output


✨ Features

  • 🔍 Multi-method verification — auto-detects the best available method:
    1. SMTP port 25 (best accuracy — direct mailbox verification)
    2. SMTP port 465 TLS (encrypted fallback)
    3. SMTP port 587 (submission port fallback)
    4. HTTP Google account check (no SMTP needed)
    5. DNS-only (syntax + MX validation, last resort)
  • 🔐 SOCKS5 and HTTP proxy support — works with paid proxies (IPRoyal, Webshare) or free proxy lists
  • 🔁 Proxy rotation — round-robin through a proxies.txt file
  • 🛡️ Rate limit protection — auto-retry with backoff on Gmail 421 responses, configurable delay between checks
  • 📊 Detailed output — per-email verdicts with SMTP status codes, organized output files, CSV export
  • 🌐 Cross-platform — Windows, Linux, macOS

🧰 Requirements

  • Node.js v18+
  • No other dependencies

🚀 Quick Start

  1. Download gmail3.js from the Releases page
  2. Create a text file with one email per line:
johndoe@gmail.com
janedoe@gmail.com
fakeemail12345@gmail.com
  1. Run:
node gmail3.js emails.txt

📖 Usage

node gmail3.js <path-to-emails.txt> [--no-proxy]

Input file format — plain text, one email per line. Lines starting with # are ignored:

# My lead list
johndoe@gmail.com
janedoe@gmail.com
test@gmail.com

📂 Output

Creates a timestamped folder next to your input file:

results_20250314_153045/
  valid.txt       # Confirmed real Gmail addresses
  invalid.txt     # Non-existent addresses
  risky.txt       # Catch-all or inconclusive results
  unknown.txt     # Rate limited or temporary errors
  results.csv     # Full details with SMTP status codes
Verdict Meaning
Valid Gmail confirmed the mailbox exists (250 response)
Invalid Gmail rejected the address — mailbox does not exist (550 response)
Risky Inconclusive — catch-all or ambiguous response
Unknown Temporary error — rate limited, timeout, or connection issue

⚙️ Configuration

Set via environment variables:

Variable Default Description
DELAY 2000 Delay in ms between each check
SMTP_TIMEOUT 10000 Timeout in ms per SMTP probe
VERIFY_METHOD auto Override method: smtp25, smtp465, smtp587, http, or auto

Examples:

# Default
node gmail3.js emails.txt

# Faster checks (500ms delay)
DELAY=500 node gmail3.js emails.txt

# Force SMTP port 25
VERIFY_METHOD=smtp25 node gmail3.js emails.txt

# Windows
set DELAY=500 && node gmail3.js emails.txt

🔐 Proxy Support

Use SOCKS5 or HTTP proxies to bypass port 25 restrictions on cloud servers and avoid IP-based rate limiting.

Option 1: Single Proxy via Environment Variables

Variable Default Description
PROXY_HOST Proxy hostname or IP
PROXY_PORT 1080 Proxy port
PROXY_USER Username (optional for free proxies)
PROXY_PASS Password (optional for free proxies)
PROXY_TYPE socks5 Protocol: socks5 or http
# IPRoyal SOCKS5
PROXY_HOST=geo.iproyal.com PROXY_PORT=12321 PROXY_USER=myuser PROXY_PASS=mypass node gmail3.js emails.txt

# Free SOCKS5 (no auth)
PROXY_HOST=1.2.3.4 PROXY_PORT=1080 node gmail3.js emails.txt

# HTTP proxy
PROXY_HOST=1.2.3.4 PROXY_PORT=8080 PROXY_TYPE=http node gmail3.js emails.txt

# Windows
set PROXY_HOST=geo.iproyal.com && set PROXY_PORT=12321 && set PROXY_USER=myuser && set PROXY_PASS=mypass && node gmail3.js emails.txt

Option 2: Proxy List File (Rotation)

Create a proxies.txt in the same directory. Supported formats — mix and match:

1.2.3.4:1080
socks5://user:pass@10.0.0.2:1080
http://user:pass@10.0.0.4:3128
10.0.0.5:1080:myuser:mypass

Run normally and it picks up the file automatically. Or point to a custom file:

PROXY_FILE=/path/to/my_proxies.txt node gmail3.js emails.txt

Disable Proxies

node gmail3.js emails.txt --no-proxy

Most residential proxy providers block SMTP ports. IPRoyal and self-hosted proxies are known to allow SMTP over SOCKS5.


🖥️ Where to Run

Environment Port 25 Notes
Home computer Open Best option — residential IP
Hetzner VPS Open Good cloud option
OVH VPS Open Good cloud option
DigitalOcean Open May need to request unblock
Vultr Blocked Use with SOCKS5 proxy
AWS EC2 Blocked Use with SOCKS5 proxy
Azure Blocked Use with SOCKS5 proxy

🔎 How It Works

  1. Syntax check — validates email format
  2. Disposable domain check — flags known throwaway providers
  3. Gmail domain verification — confirms gmail.com or googlemail.com
  4. MX record lookup — resolves Gmail's mail exchange servers
  5. SMTP handshakeEHLOMAIL FROMRCPT TO — Gmail replies with 250 (exists) or 550 (doesn't exist)

No actual emails are sent. The tool only checks whether the mailbox exists.


⚡ Rate Limiting

  • Default 2 second delay between checks (DELAY=2000)
  • Auto-retry on 421 responses with 30s / 60s / 90s backoff
  • 3+ consecutive rate limits triggers a 60 second pause

For large lists (1000+ emails): use a rotating residential IP proxy, increase delay to DELAY=5000, or split the list across multiple sessions.


📜 License

MIT

About

A standalone Node.js CLI tool that validates Gmail addresses to determine if they are real and deliverable. Built for campaign lead verification to eliminate email bounces before sending.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages