🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

check_email_status

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check_email_status

Check the existence of a mailbox via SMTP.

1.1.3
96

Supply Chain Security

100

Vulnerability

100

Quality

100

Maintenance

100

License

Maintainers
1

check_email_status

This package exists to help poll smtp servers to see if a mailbox address is valid. It doesn't return true or false, but a set of status codes, extended status codes, and full messages from the responding server.

Usage

Here is an example using pyDNS as the MX resolver::

from check_email_status import check_email_status
from check_email_status.resolvers import PyDNSMXResolver

status = check_email_status(PyDNSMXResolver, 'recipient@domain.com', 'sender@domain.com')

# This is the SMTP status code returned by the server. (e.g.) 550
print status['status']

# This is the extended status code, for instance 5.1.1 would mean the account doesn't exist.
# If an extended code is not sent, this is not set.
print status['extended_status']

# This is the message returned from the mail server describing the results of the query.
print status['messsage']

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts