Skip to main content

Python Email Ahoy 3

A Python email utility that verifies existence of an email address

Overview

A Python email utility that verifies existence of an email address. This package is based on this package which only run in Python 2. It has been refactored to work in Python 3.

How to install

Use Pip (note that it works only for Python 3.6+ sicne it uses f-strings):

pip3 install python-emailahoy3 --user

How to use

Use the shorthand function for quick check:

from emailahoy3 import verify_email_address
status =verify_email_address('test@example.com')
print(status)

Codes are defined as follows:

  • 1. The email exists.
  • 0. The email does not exist.
  • -1. The existence of the email could not be verified.

You can also use the class for more control & more granular return status:

from emailahoy3 import VerifyEmail
e = VerifyEmail()
status = e.verify_email_smtp(
                    email='test@example.com',
                    from_host='mydomain.com',
                    from_email='verify@mydomain.com'
                )
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

Notes

  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 more

Running the tests

To run the tests against the current environment:

python3 -m unittest discover

License

Released under a (BSD) license.

Metadata

Release files for python-emailahoy3 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-emailahoy3 0.1.3
File Size Uploaded Provenance Actions
python-emailahoy3-0.1.3.tar.gz 7.7 kB Without provenance Details for python-emailahoy3-0.1.3.tar.gz

Release files / python-emailahoy3-0.1.3.tar.gz

Download URL python-emailahoy3-0.1.3.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
547e262eb8631d302173008332a7d896cbb4086502f4b72c62dffe62bae5fd2f
BLAKE2b-256 checksum
How to use checksums
c45afe26c3422151b3ca6746db765e5062ef167dbf23400554a681f9248a10ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.3

Security for python-emailahoy3 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page