Email Verification Tool Setup
Email Verification Tool Setup
Introduction:
This document will guide you through the setup and usage of the Email Verification Tool. The tool is
designed to validate emails by checking their domain's MX (Mail Exchange) records and connecting
to the SMTP server to verify if the email is valid. You will learn how to install, configure, and run the
tool effectively.
Setup Instructions:
1. Install Dependencies:
- Replace the following in the script with your bot's token and chat ID:
TELEGRAM_BOT_TOKEN = "YOUR_BOT_TOKEN"
TELEGRAM_CHAT_ID = "YOUR_CHAT_ID"
3. Prepare Email List:
- Create a file named `emails.txt` with each email address on a new line.
- Once everything is set up, you can run the script using:
python email_verification_tool.py
- The script will connect to each email domain's MX server and attempt to verify the email
addresses.
- Results will be displayed in the terminal and saved in `valid_emails.txt`, `invalid_emails.txt`, and
`unknown_emails.txt`.
5. Check Results:
- After the script completes, you can view the results by checking the generated text files.
- The script will also send these results to your Telegram bot as files.
Script Explanation:
1. Loading the Email List: The script reads the email addresses from the `emails.txt` file.
2. Checking Email Validity: For each email, the script resolves the MX records of the domain and
3. Collecting Results: The script categorizes each email into three groups: 'Valid', 'Invalid', or
'Unknown'.
4. Displaying Results: A colorful table displaying the results is shown in the terminal using the `rich`
library.
5. Storing Results: Valid, invalid, and unknown emails are saved to separate text files
6. Sending Results: The results are sent to the Telegram bot in the form of documents for easy
access.
2. Ensure that the required libraries (aiosmtplib, dnspython, requests, rich, fpdf) are installed.
3. Place the `emails.txt` file with the list of email addresses in the same folder as the script.
python email_verification_tool.py
6. Once the script finishes, you will see the results in the terminal and the results will also be saved
7. Your Telegram bot will receive the `valid_emails.txt` and `invalid_emails.txt` files as well.