Code Monkey home page Code Monkey logo

email_checker's Introduction

Email checker


Checks the possibility of sending an email to the specified address. Sometimes it is necessary to check the address specified by the user to avoid unnecessary loads and block the sending of messages to invalid addresses.

Performance depends on the IP address of the system on which you run the email check. It is better to use the server that you use to send your email messages.

This version required dig for get address of MX server

  • Sample with invalid email
crystal run email_checker.cr -- -e [email protected]
Checking address: <[email protected]>
MX is: gmail-smtp-in.l.google.com.
Start checking.
220 mx.google.com ESMTP o12si36431842ljc.263 - gsmtp
HELO example.com
250 mx.google.com at your service
MAIL FROM: <[email protected]>
250 2.1.0 OK o12si36431842ljc.263 - gsmtp
RCPT TO: <[email protected]>
550-5.1.1 The email account that you tried to reach does not exist. Please try
Email <[email protected]> is invalid.
Done.
  • Sample with valid email
crystal run email_checker.cr -- -e [email protected]
Checking address: <[email protected]>
MX is: aspmx.l.google.com.
Start checking.
220 mx.google.com ESMTP m15si28862652lfc.164 - gsmtp
HELO example.com
250 mx.google.com at your service
MAIL FROM: <[email protected]>
250 2.1.0 OK m15si28862652lfc.164 - gsmtp
RCPT TO: <[email protected]>
250 2.1.5 OK m15si28862652lfc.164 - gsmtp
Email <[email protected]> is valid.
Done.

Todo:

  • Write get mx from DNS directly
  • Make multiple emails checking from file

email_checker's People

Contributors

dammer avatar

Stargazers

 avatar

Watchers

 avatar

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.