π« The Pain Point
Your marketing list has 5000 emails. Before spending on email campaigns, you need to verify theyβre real. Typos like βgmial.comβ waste money. Invalid domains bounce.
π Agentic Solution
A Multi-Level Email Validator that checks syntax and mail server existence.
Key Features:
- Syntax Check: Valid format (user@domain.com).
- Domain Check: Does the domain exist?
- MX Record Check: Does the domain accept email?
βοΈ Phase 1: Commander (Quick Fix)
For quick validation.
Prompt:
βI have an Excel
emails.xlsxwith column βEmailβ. Write a Python script using dnspython to:
- Syntax Check: Validate email format with regex.
- MX Check: Verify domain has MX records.
- Classify: Valid, Invalid_Syntax, Invalid_Domain.
- Output: Save with βStatusβ column.
Print validation summary. Handle timeouts gracefully.β
Result: Clean email list with bad addresses flagged.
ποΈ Phase 2: Architect (Permanent Tool)
Engineering Prompt:
**Role:** Python Tool Developer
**Task:** Create an "Email Validator".
**Requirements:**
1. **GUI:**
* Select Excel file.
* Column picker.
* Validation level: Syntax / +Domain / +MX.
* Progress bar.
* Export clean/invalid lists.
2. **Logic:**
* Regex for syntax.
* DNS lookup for domain.
* Concurrent MX checks for speed.
* Cache domain results.
3. **Deliverables:**
* `email_validator.py`
* `run.bat`, `run.sh`
* `requirements.txt`
π§ Prompt Decoding
- MX Records: Mail eXchanger records indicate a domain can receive email.
π οΈ Instructions
- Install:
pip install dnspython - Copy Prompt β Run.