Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/un33k/python-emailahoy
Checks if an email address is real
https://github.com/un33k/python-emailahoy
Last synced: 3 days ago
JSON representation
Checks if an email address is real
- Host: GitHub
- URL: https://github.com/un33k/python-emailahoy
- Owner: un33k
- License: bsd-3-clause
- Created: 2012-09-17T03:55:41.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2021-11-29T13:29:44.000Z (almost 3 years ago)
- Last Synced: 2024-04-25T01:40:41.149Z (6 months ago)
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 104
- Watchers: 12
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- starred-awesome - python-emailahoy - Checks if an email address is real (Python)
README
Python Email Ahoy
====================**A Python email utility that verifies existence of an email address**
[![build-status-image-fury]][fury]
Overview
========A Python email utility that verifies existence of an email address.
How to install
==================1. easy_install python-emailahoy
2. pip install python-emailahoy
3. git clone http://github.com/un33k/python-emailahoy
a. cd python-emailahoy
b. run python setup.py
4. wget https://github.com/un33k/python-emailahoy/zipball/master
a. unzip the downloaded file
b. cd into python-emailahoy-* directory
c. run python setup.pyHow to use
=================``Use the class for more control & more granular return status``
```python
from emailahoy import VerifyEmail
e = VerifyEmail()
status = e.verify_email_smtp(
email='[email protected]',
from_host='mydomain.com',
from_email='[email protected]'
)if e.was_found(status):
print >> sys.stderr, "Found:", status
elif e.not_found(status):
print >> sys.stderr, "Not Found:", status
else:
print >> sys.stderr, "Unverifiable:", status
`````Use the shorthand function for quick check``
```python
if verify_email_address('[email protected]'):
print >> sys.stderr, "Found"
else:
print >> sys.stderr, "Don't care"
`````Note:``
1. Not all email servers will return the correct status
2. Checking an invalid email address returns within 1 second
3. Checking a valid email address returns within 4 seconds or moreRunning the tests
=================To run the tests against the current environment:
python test.py
License
====================Released under a ([BSD](LICENSE.md)) license.
[build-status-image-fury]: https://badge.fury.io/py/python-emailahoy.png
[fury]: http://badge.fury.io/py/python-emailahoy