Giter Club home page Giter Club logo

email-verifier's Introduction

Email Verifier

Email Verifier provides a verification of email deliverablity and existance over SOCKS proxy SMTP connection or normal SMTP connection.

Email Verifier uses the custom SocksSMTP class which is a subclass of builtin SMTP class and replaces the socket attribute with SOCKS proxy sockets if a proxy is provided. The class acts as normal SMTP in case no proxy is provided.

How is email verified?

The best way to test deliverablity of an email address will be to actually send an email. But, we don't want to spam anyone's email just to test that.

Next best thing will be to try sending an email but close the connection just before completing the process.

Here are the steps how we do that.

  1. Create a connection with the SMTP sever for the given email (Provided the email is in valid format).
  2. Send HELO to initialize the conversation with the server.
  3. Send MAIL FROM to indicate the sender's address.
  4. Send RCPT TO with the email address to verify.
  5. Determine the deliverablity of the email based on the status of RCPT TO.
  6. Close the connection.

Example Usage

Copy the verifier directory to your project

# use an appropriate path to import
from verifier.verifier import Verifier

# Use normal SMTP to connect to the server
normal_verifier = Verifier(source_addr='[email protected]') # No proxy
results = normal_verifier.verify('[email protected]')

# Use socks proxy to connect over SMTP
socks_verifier =  Verifier(
    source_addr='[email protected]',
    proxy_type='socks5',
    proxy_addr='socks5.your-proxy-provider.com',
    proxy_port=1080,
    proxy_username='funky-username',
    proxy_password='crazy-password'
)
results = socks_verifier.verify('[email protected]')

The verifier can also be run directly.

$ python3 verifier.py

Make sure your firewall allows outgoing connects on SMTP port.

Dependencies

This project have following external dependencies

Contributions

I you find any bugs, please feel free to open an issue or send a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.