π« 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)
For Digital Marketers.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Bulk Email Validator" Desktop App
**Objective:** A desktop tool to clean email lists by verifying syntax, domains, and MX records.
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* Network: dnspython
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Input:** Excel/CSV File Loader + Email Column Selector.
* **Settings:** Checkboxes for "Syntax Check" (Fast), "DNS Check" (Medium), "MX Check" (Slow/Strict).
* **Dashboard:** Counters for "Valid", "Invalid", "Unknown".
2. **Core Logic:**
* **Level 1:** Regex validation.
* **Level 2:** `dns.resolver.resolve(domain, 'A')`.
* **Level 3:** `dns.resolver.resolve(domain, 'MX')`.
* **Threading:** Critical. Use `QThread` pool to parallelize checks (e.g., 10-20 workers).
3. **Deliverables:**
* `main.py`: Complete source code.
* `requirements.txt`: Dependencies.
* **Build Instructions:**
* Windows: `pyinstaller --onefile --noconsole main.py`
* macOS: `pyinstaller --windowed --noconsole main.py`
π§ Prompt Decoding
- MX Records: Mail eXchanger records indicate a domain can receive email.
π οΈ Instructions
- Install:
pip install dnspython - Copy Prompt β Run.