Skip to content

Commit 056f4af

Browse files
Update README.md
1 parent b61d30e commit 056f4af

File tree

1 file changed

+80
-210
lines changed

1 file changed

+80
-210
lines changed

README.md

Lines changed: 80 additions & 210 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
MailboxValidator Python Module
22
==============================
33

4-
This Python module provides an easy way to call the MailboxValidator API which validates if an email address is a valid one.
4+
This Python module enables user to easily validate if an email address is valid, a type of disposable email or free email.
5+
6+
This module can be useful in many types of projects, for example
7+
8+
- to validate an user's email during sign up
9+
- to clean your mailing list prior to email sending
10+
- to perform fraud check
11+
- and so on
512

6-
This module can be used in many types of projects such as:
713

8-
- validating a user's email during sign up
9-
- cleaning your mailing list prior to an email marketing campaign
10-
- a form of fraud check
11-
12-
1314
Installation
1415
============
1516

@@ -26,8 +27,75 @@ An API key is required for this module to function.
2627
Go to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.
2728

2829

29-
Usage for validating emails
30-
===========================
30+
Functions
31+
=========
32+
33+
## SingleValidation(api_key)
34+
35+
Creates a new instance of the MailboxValidator object with the API key.
36+
37+
## ValidateEmail(email_address)
38+
39+
Performs email validation on the supplied email address.
40+
41+
### Return Fields
42+
43+
| Field Name | Description |
44+
|-----------|------------|
45+
| email_address | The input email address. |
46+
| domain | The domain of the email address. |
47+
| is_free | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False |
48+
| is_syntax | Whether the email address is syntactically correct. Return values: True, False |
49+
| is_domain | Whether the email address has a valid MX record in its DNS entries. Return values: True, False, -   (- means not applicable) |
50+
| is_smtp | Whether the mail servers specified in the MX records are responding to connections. Return values: True, False, -   (- means not applicable) |
51+
| is_verified | Whether the mail server confirms that the email address actually exist. Return values: True, False, -   (- means not applicable) |
52+
| is_server_down | Whether the mail server is currently down or unresponsive. Return values: True, False, -   (- means not applicable) |
53+
| is_greylisted | Whether the mail server employs greylisting where an email has to be sent a second time at a later time. Return values: True, False, -   (- means not applicable) |
54+
| is_disposable | Whether the email address is a temporary one from a disposable email provider. Return values: True, False, -   (- means not applicable) |
55+
| is_suppressed | Whether the email address is in our blacklist. Return values: True, False, -   (- means not applicable) |
56+
| is_role | Whether the email address is a role-based email address like [email protected] or [email protected]. Return values: True, False, -   (- means not applicable) |
57+
| is_high_risk | Whether the email address contains high risk keywords. Return values: True, False, -   (- means not applicable) |
58+
| is_catchall | Whether the email address is a catch-all address. Return values: True, False, Unknown, -   (- means not applicable) |
59+
| mailboxvalidator_score | Email address reputation score. Score > 0.70 means good; score > 0.40 means fair; score <= 0.40 means poor. |
60+
| time_taken | The time taken to get the results in seconds. |
61+
| status | Whether our system think the email address is valid based on all the previous fields. Return values: True, False |
62+
| credits_available | The number of credits left to perform validations. |
63+
| error_code | The error code if there is any error. See error table in the below section. |
64+
| error_message | The error message if there is any error. See error table in the below section. |
65+
66+
## DisposableEmail(email_address)
67+
68+
Check if the supplied email address is from a disposable email provider.
69+
70+
### Return Fields
71+
72+
| Field Name | Description |
73+
|-----------|------------|
74+
| email_address | The input email address. |
75+
| is_disposable | Whether the email address is a temporary one from a disposable email provider. Return values: True, False |
76+
| credits_available | The number of credits left to perform validations. |
77+
| error_code | The error code if there is any error. See error table in the below section. |
78+
| error_message | The error message if there is any error. See error table in the below section. |
79+
80+
## FreeEmail(email_address)
81+
82+
Check if the supplied email address is from a free email provider.
83+
84+
### Return Fields
85+
86+
| Field Name | Description |
87+
|-----------|------------|
88+
| email_address | The input email address. |
89+
| is_free | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False |
90+
| credits_available | The number of credits left to perform validations. |
91+
| error_code | The error code if there is any error. See error table in the below section. |
92+
| error_message | The error message if there is any error. See error table below. |
93+
94+
95+
Sample Codes
96+
============
97+
98+
## Validate email
3199

32100
```python
33101
import MailboxValidator
@@ -61,131 +129,8 @@ import MailboxValidator
61129
print('error_message = ' + results['error_message'] + "\n")
62130
```
63131

64-
Functions
65-
=========
66-
67-
### SingleValidation(api_key)
68-
69-
Creates a new instance of the MailboxValidator object with the API key.
70-
71-
### ValidateEmail(email_address)
72-
73-
Performs email validation on the supplied email address.
74-
75-
Result Fields
76-
=============
77-
78-
### email_address
79-
80-
The input email address.
81-
82-
### domain
83-
84-
The domain of the email address.
85-
86-
### is_free
87-
88-
Whether the email address is from a free email provider like Gmail or Hotmail.
89-
90-
Return values: True, False
91-
92-
### is_syntax
93-
94-
Whether the email address is syntactically correct.
95-
96-
Return values: True, False
97-
98-
### is_domain
99-
100-
Whether the email address has a valid MX record in its DNS entries.
101-
102-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
103-
104-
### is_smtp
105-
106-
Whether the mail servers specified in the MX records are responding to connections.
107-
108-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
109-
110-
### is_verified
111-
112-
Whether the mail server confirms that the email address actually exist.
113-
114-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
115-
116-
### is_server_down
117-
118-
Whether the mail server is currently down or unresponsive.
119-
120-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
121-
122-
### is_greylisted
123-
124-
Whether the mail server employs greylisting where an email has to be sent a second time at a later time.
125-
126-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
127-
128-
### is_disposable
129-
130-
Whether the email address is a temporary one from a disposable email provider.
131-
132-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
133-
134-
### is_suppressed
135-
136-
Whether the email address is in our blacklist.
137-
138-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
139-
140-
### is_role
141-
142-
Whether the email address is a role-based email address like [email protected] or [email protected].
143132

144-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
145-
146-
### is_high_risk
147-
148-
Whether the email address contains high risk keywords.
149-
150-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
151-
152-
### is_catchall
153-
154-
Whether the email address is a catch-all address.
155-
156-
Return values: True, False, Unknown, -&nbsp;&nbsp;&nbsp;(- means not applicable)
157-
158-
### mailboxvalidator_score
159-
160-
Email address reputation score.
161-
162-
Score > 0.70 means good; score > 0.40 means fair; score <= 0.40 means poor.
163-
164-
### time_taken
165-
166-
The time taken to get the results in seconds.
167-
168-
### status
169-
170-
Whether our system think the email address is valid based on all the previous fields.
171-
172-
Return values: True, False
173-
174-
### credits_available
175-
176-
The number of credits left to perform validations.
177-
178-
### error_code
179-
180-
The error code if there is any error. See error table below.
181-
182-
### error_message
183-
184-
The error message if there is any error. See error table below.
185-
186-
187-
Usage for checking if an email is from a disposable email provider
188-
===================================================================
133+
## Check if an email is from a disposable email provider
189134

190135
```python
191136
import MailboxValidator
@@ -204,45 +149,7 @@ import MailboxValidator
204149
print('error_message = ' + results['error_message'] + "\n")
205150
```
206151

207-
Functions
208-
=========
209-
210-
### SingleValidation(api_key)
211-
212-
Creates a new instance of the MailboxValidator object with the API key.
213-
214-
### DisposableEmail(email_address)
215-
216-
Check if the supplied email address is from a disposable email provider.
217-
218-
Result Fields
219-
=============
220-
221-
### email_address
222-
223-
The input email address.
224-
225-
### is_disposable
226-
227-
Whether the email address is a temporary one from a disposable email provider.
228-
229-
Return values: True, False
230-
231-
### credits_available
232-
233-
The number of credits left to perform validations.
234-
235-
### error_code
236-
237-
The error code if there is any error. See error table below.
238-
239-
### error_message
240-
241-
The error message if there is any error. See error table below.
242-
243-
244-
Usage for checking if an email is from a free email provider
245-
============================================================
152+
## Check if an email is from a free email provider
246153

247154
```python
248155
import MailboxValidator
@@ -261,43 +168,6 @@ import MailboxValidator
261168
print('error_message = ' + results['error_message'] + "\n")
262169
```
263170

264-
Functions
265-
=========
266-
267-
### SingleValidation(api_key)
268-
269-
Creates a new instance of the MailboxValidator object with the API key.
270-
271-
### FreeEmail(email_address)
272-
273-
Check if the supplied email address is from a free email provider.
274-
275-
Result Fields
276-
=============
277-
278-
### email_address
279-
280-
The input email address.
281-
282-
### is_free
283-
284-
Whether the email address is from a free email provider like Gmail or Hotmail.
285-
286-
Return values: True, False
287-
288-
### credits_available
289-
290-
The number of credits left to perform validations.
291-
292-
### error_code
293-
294-
The error code if there is any error. See error table below.
295-
296-
### error_message
297-
298-
The error message if there is any error. See error table below.
299-
300-
301171
Errors
302172
======
303173

@@ -313,4 +183,4 @@ Errors
313183
Copyright
314184
=========
315185

316-
Copyright (C) 2018 by MailboxValidator.com, [email protected]
186+
Copyright (C) 2018-2020 by MailboxValidator.com, [email protected]

0 commit comments

Comments
 (0)