Carlos Killpack b69afc9dd1 Update test.py 3 years ago
.gitignore Better interop with syrusakbary/validate_email 4 years ago
.travis.yml Update .travis.yml 3 years ago
AUTHORS Update AUTHORS 3 years ago
COPYING Update and rename LICENSE to COPYING 3 years ago
COPYING.LESSER Create COPYING.LESSER 3 years ago
MANIFEST.in Update MANIFEST.in 3 years ago
README.rst Update README.rst 3 years ago
setup.py Update setup.py 3 years ago
test.py Update test.py 3 years ago
validate_email.py Update validate_email.py 3 years ago

README.rst

|test| |cover|

======================
validate-email-address
======================

`validate-email-address` is a package for Python that check if an email is valid, properly formatted and (optionally) really exists.



INSTALLATION
============

First, you must do::

pip install validate-email-address


Extra
-----

To check that the domain mx and email address exist you must have the `pyDNS` package installed::

# Python 2.x
pip install Py3DNS
# Python 3.x
pip install Py3DNS


USAGE
=====

Basic usage::

>>> from validate_email import validate_email
>>> validate_email('example@example.com')
True

Note that this function call *only* verifies that the string matches RFC 2822, *not* that the
email exists or is deliverable.

Checking domain has SMTP Server
-------------------------------

Check if the host has SMTP Server::

>>> from validate_email import validate_email
>>> validate_email('example@sharklasers.com', check_mx=True)
True


Verify email exists
-------------------

Check if the host has SMTP Server and the email really exists::

>>> from validate_email import validate_email
>>> validate_email('example@sharklasers.com', verify=True)
True


.. |test| image:: https://travis-ci.org/heropunch/validate-email-address.svg?branch=master
:target: https://travis-ci.org/heropunch/validate-email-address
.. |cover| image:: https://coveralls.io/repos/heropunch/validate-email-address/badge.svg?branch=master&service=github
:target: https://coveralls.io/github/heropunch/validate-email-address?branch=master