1.
Install Python stable release
From: [Link]
✅ During install, check “Add Python to PATH”
2. Install Required Libraries
Open Command Prompt and run:
bash
pip install pyinstaller dnspython
pip install pyinstaller openpyxl
3. Open Command Prompt
Press Windows + R, type cmd, then hit Enter
Navigate to the folder where you saved the .py file.
Example: If it's on your Desktop:
bash
cd Desktop
Or if it's in Downloads:
bash
cd Downloads
4. Build the .exe
Navigate to the folder where you saved the script, then run:
bash
CopyEdit
pyinstaller --onefile --windowed email_verifier_app.py
Your App is Ready
Find the final .exe inside the dist folder.
Simple Instructions to Create the Script Locally
You’ll manually create the Python file — this only takes 1 minute:
🔹 Step 1: Open Notepad
1. Press Windows + R, type notepad, and hit Enter.
🔹 Step 2: Copy & Paste the Code Below
python
CopyEdit
import tkinter as tk
from tkinter import filedialog, messagebox
import re
import [Link]
import smtplib
import csv
import os
import openpyxl
def is_valid_syntax(email):
pattern = r"^[\w\.-]+@[\w\.-]+\.\w+$"
return [Link](pattern, email) is not None
def has_mx_record(domain):
try:
records = [Link](domain, 'MX')
return len(records) > 0
except:
return False
def smtp_check(email):
domain = [Link]('@')[1]
try:
mx_records = [Link](domain, 'MX')
mx_record = str(mx_records[0].exchange)
server = [Link](timeout=10)
[Link](mx_record)
[Link]('[Link]')
[Link]('test@[Link]')
code, message = [Link](email)
[Link]()
return code == 250 or code == 251
except:
return False
def read_emails(file_path):
emails = []
ext = [Link](file_path)[1].lower()
try:
if ext == '.csv':
with open(file_path, newline='', encoding='utf-8') as f:
reader = [Link](f)
for row in reader:
if row:
[Link](row[0].strip())
elif ext == '.txt':
with open(file_path, 'r', encoding='utf-8') as f:
for line in f:
email = [Link]()
if email:
[Link](email)
elif ext == '.xlsx':
wb = openpyxl.load_workbook(file_path)
ws = [Link]
for row in ws.iter_rows(min_row=1, max_col=1, values_only=True):
email = row[0]
if email:
[Link](str(email).strip())
except Exception as e:
[Link]("Error", f"Failed to read file: {e}")
return emails
def verify_emails(file_path):
results = []
emails = read_emails(file_path)
for email in emails:
status = "Invalid Format"
if is_valid_syntax(email):
domain = [Link]('@')[1]
if has_mx_record(domain):
if smtp_check(email):
status = "Valid"
else:
status = "SMTP Failed"
else:
status = "No MX Record"
[Link]((email, status))
return results
def save_results(results, out_file):
with open(out_file, 'w', newline='', encoding='utf-8') as csvfile:
writer = [Link](csvfile)
[Link](["Email", "Status"])
for row in results:
[Link](row)
def start_verification():
file_path = [Link](filetypes=[("All Supported", "*.csv *.xlsx *.txt"),
("CSV files", "*.csv"),
("Excel files", "*.xlsx"),
("Text files", "*.txt")])
if not file_path:
return
[Link]("Processing", "Email verification in progress. This may take a few
minutes...")
results = verify_emails(file_path)
out_file = [Link](defaultextension=".csv", filetypes=[("CSV files", "*.csv")])
if out_file:
save_results(results, out_file)
[Link]("Done", f"Verification complete. Results saved to: {out_file}")
root = [Link]()
[Link]("Email Verifier")
[Link]("300x150")
label = [Link](root, text="Email Verifier with SMTP Check", font=("Arial", 12))
[Link](pady=20)
btn = [Link](root, text="Start Verification", command=start_verification)
[Link](pady=10)
[Link]()
🔹 Step 3: Save the File
In Notepad:
Click File → Save As
File name: email_verifier_all_filetypes.py
Save as type: All Files
Encoding: UTF-8
Location: Desktop or Downloads
🔹 Step 4: Run the App
In Command Prompt:
bash
CopyEdit
cd Desktop
python email_verifier_all_filetypes.py
Step-by-Step: Convert .py to .exe
🔹 Step 1: Open Command Prompt
Press Windows + R, type cmd, and hit Enter
🔹 Step 2: Install PyInstaller (if not already)
Run this:
bash
CopyEdit
pip install pyinstaller
🔹 Step 3: Go to the Script Folder
Use the cd command to go to the folder where you saved email_verifier_all_filetypes.py
Example:
bash
CopyEdit
cd Desktop
🔹 Step 4: Run PyInstaller to Build .exe
Use this command:
bash
CopyEdit
pyinstaller --onefile --windowed email_verifier_all_filetypes.py
✅ What this does:
--onefile: Packs everything into one .exe
--windowed: Hides the black terminal window (since it's a GUI app)
🔹 Step 5: Find Your .exe File
After it finishes:
Go to the dist folder inside the script directory
You’ll find: email_verifier_all_filetypes.exe
✅ Double-click it — your app is ready to use!