Email Validator Skill
Validate emails using Python.
python3 -c "
import re
email = '{email}'
pattern = r'[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}'
if re.match(pattern, email):
print(f'Format: Valid')
domain = email.split('@')[1]
import subprocess
result = subprocess.run(['dig', domain, 'MX', '+short'], capture_output=True, text=True)
if result.stdout.strip():
print(f'MX Records: Found')
print(result.stdout.strip())
else:
print(f'MX Records: None found (domain may not accept email)')
else:
print(f'Format: Invalid')
"
Common Typo Detection
Check for: gmial.com, gmal.com, hotmal.com, yahooo.com, outlok.com
Notes
- Format validation only checks structure
- MX record check verifies the domain can receive email
- Cannot verify if the specific address exists without sending