Skip to content

Added email-validator script #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions scripts/Email Validator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Email Validator with Python

This is a script that takes input as an email address and checks whether the email address is valid or not. It contains checking static email address format as well as smtp server checking for better validation.


### Usage
- Install the requirements (refer below)
- Run the script by 'python email_validator.py'
- Input the email address to be validated when prompted


### Requirements
```pip install py3dns, pyfiglet, validate-email-address```
27 changes: 27 additions & 0 deletions scripts/Email Validator/email_validator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
'''
Author: smit-sms
'pip install py3dns,pyfiglet,validate-email-address' to get required libraries

USAGE
- Run the script by 'python email_validator.py'
- Input the email address to be validated when prompted
'''


import pyfiglet
from validate_email_address import validate_email

# printing the ascii banner
print(pyfiglet.figlet_format(" Email Validator"))

print('-' * 72)
email_id = input("Enter email address to be validated: ")
print('-' * 72)

# Verifying the email id with the smtp server to check validity
isvalid = validate_email(email_id, verify=True)

if isvalid:
print("\n\nThe following email address is Valid.\n")
else:
print("\n\nThe following email address is Invalid.\n")
3 changes: 3 additions & 0 deletions scripts/Email Validator/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
py3dns
pyfiglet
validate-email-address