nemzyxt / mailcheck

Python wrapper for the MailCheck.ai API

Home Page:https://pypi.org/project/mailcheck

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mailcheck

Python wrapper for the MailCheck.ai API

Installation

pip install mailcheck

Usage

Import package

from mailcheck import MailCheckClient

Instantiate client

Without API key:

client = MailCheckClient()

With API key (for Pro plan users):

client = MailCheckClient(YOUR_MAILCHECK.AI_API_KEY)

Check domain name

response = client.check_domain('google.com')
print(response)

Output:

{
    'status': 200,
    'domain': 'google.com',
    'mx': True,
    'disposable': False,
    'public_domain': False,
    'did_you_mean': None
}

Check email address

response = client.check_email('bill@microsoft.com')
print(response)

Output:

{
    'status': 200,
    'email': 'bill@microsoft.com',
    'domain': 'microsoft.com',
    'mx': True,
    'disposable': False,
    'public_domain': False,
    'alias': False,
    'did_you_mean': None
}