Python
Python
bash
bash
cd Desktop
Or if it's in Downloads:
bash
cd Downloads
bash
CopyEdit
You’ll manually create the Python file — this only takes 1 minute:
python
CopyEdit
import tkinter as tk
import re
import dns.resolver
import smtplib
import csv
import os
import openpyxl
def is_valid_syntax(email):
pattern = r"^[\w\.-]+@[\w\.-]+\.\w+$"
def has_mx_record(domain):
try:
except:
return False
def smtp_check(email):
domain = email.split('@')[1]
try:
mx_record = str(mx_records[0].exchange)
server = smtplib.SMTP(timeout=10)
server.connect(mx_record)
server.helo('example.com')
server.mail('[email protected]')
except:
return False
def read_emails(file_path):
emails = []
ext = os.path.splitext(file_path)[1].lower()
try:
if ext == '.csv':
reader = csv.reader(f)
if row:
emails.append(row[0].strip())
for line in f:
email = line.strip()
if email:
emails.append(email)
wb = openpyxl.load_workbook(file_path)
ws = wb.active
email = row[0]
if email:
emails.append(str(email).strip())
except Exception as e:
return emails
def verify_emails(file_path):
results = []
emails = read_emails(file_path)
if is_valid_syntax(email):
domain = email.split('@')[1]
if has_mx_record(domain):
if smtp_check(email):
status = "Valid"
else:
else:
results.append((email, status))
return results
writer = csv.writer(csvfile)
writer.writerow(["Email", "Status"])
writer.writerow(row)
def start_verification():
if not file_path:
return
results = verify_emails(file_path)
if out_file:
save_results(results, out_file)
root = tk.Tk()
root.title("Email Verifier")
root.geometry("300x150")
label.pack(pady=20)
btn.pack(pady=10)
root.mainloop()
In Notepad:
Encoding: UTF-8
In Command Prompt:
bash
CopyEdit
cd Desktop
python email_verifier_all_filetypes.py
Run this:
bash
CopyEdit
Example:
bash
CopyEdit
cd Desktop
bash
CopyEdit
--windowed: Hides the black terminal window (since it's a GUI app)
🔹 Step 5: Find Your .exe File
After it finishes: