|
| 1 | +# MailboxValidator Python API |
| 2 | + |
| 3 | +## EmailValidation Class |
| 4 | +```{py:class} EmailValidation(api_key) |
| 5 | +Configure MailboxValidator API key. |
| 6 | +
|
| 7 | +:param str api_key: (Required) MailboxValidator API key. |
| 8 | +``` |
| 9 | + |
| 10 | +```{py:function} validate_email(email) |
| 11 | +Validate whether an email address is a valid email or not. |
| 12 | +
|
| 13 | +:param str email: (Required) The email address. |
| 14 | +
|
| 15 | +:return: Returns the validation result in JSON object. |
| 16 | +:rtype: Object |
| 17 | +
|
| 18 | +**Successful Response Parameters** |
| 19 | +| Field Name | Description | |
| 20 | +|-----------|------------| |
| 21 | +| email_address | The input email address. | |
| 22 | +| base_email_address | The input email address after sanitizing the username of the dots (only Gmail) and [subaddressing](https://en.wikipedia.org/wiki/Email_address#Sub-addressing). | |
| 23 | +| domain | The domain of the email address. | |
| 24 | +| is_free | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: true, false, null (null means not applicable) | |
| 25 | +| is_syntax | Whether the email address is syntactically correct. Return values: true, false | |
| 26 | +| is_domain | Whether the email address has a valid MX record in its DNS entries. Return values: true, false, null (null means not applicable) | |
| 27 | +| is_smtp | Whether the mail servers specified in the MX records are responding to connections. Return values: true, false, null (null means not applicable) | |
| 28 | +| is_verified | Whether the mail server confirms that the email address actually exist. Return values: true, false, null (null means not applicable) | |
| 29 | +| is_server_down | Whether the mail server is currently down or unresponsive. Return values: true, false, null (null means not applicable) | |
| 30 | +| 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, null (null means not applicable) | |
| 31 | +| is_disposable | Whether the email address is a temporary one from a disposable email provider. Return values: true, false, null (null means not applicable) | |
| 32 | +| is_suppressed | Whether the email address is in our blacklist. Return values: true, false, null (null means not applicable) | |
| 33 | +| is_role | Whether the email address is a role-based email address like admin@example.net or webmaster@example.net. Return values: true, false, null (null means not applicable) | |
| 34 | +| is_high_risk | Whether the email address contains high risk keywords. Return values: true, false, null (null means not applicable) | |
| 35 | +| is_catchall | Whether the email address is a catch-all address. Return values: true, false, null (null means not applicable) | |
| 36 | +| is_dmarc_enforced | Whether the email domain is enforcing DMARC. Return values: true, false | |
| 37 | +| is_strict_spf | Whether the email domain is using strict SPF. Return values: true, false | |
| 38 | +| website_exist | Whether the email domain is a reachable website. Return values: true, false | |
| 39 | +| mailboxvalidator_score | Email address reputation score. Score > 0.70 means good; score > 0.40 means fair; score <= 0.40 means poor. | |
| 40 | +| time_taken | The time taken to get the results in seconds. | |
| 41 | +| status | Whether our system think the email address is valid based on all the previous fields. Return values: True, False | |
| 42 | +| credits_available | The number of credits left to perform validations. | |
| 43 | +
|
| 44 | +**Error Response Parameters** |
| 45 | +| Field Name | Description | |
| 46 | +|-----------|------------| |
| 47 | +| error.error_code | The error code if there is any error. See error table in the [Error Codes](reference.md) section. | |
| 48 | +| error.error_message | The error message if there is any error. See error table in the [Error Codes](reference.md) section. | |
| 49 | +
|
| 50 | +``` |
| 51 | + |
| 52 | +```{py:function} is_disposable_email(email) |
| 53 | +Validate whether an email address is a disposable email or not. |
| 54 | +
|
| 55 | +:param str email: (Required) The email address. |
| 56 | +
|
| 57 | +:return: Returns the validation result in JSON object. |
| 58 | +:rtype: Object |
| 59 | +
|
| 60 | +**Successful Response Parameters** |
| 61 | +| Field Name | Description | |
| 62 | +|-----------|------------| |
| 63 | +| email_address | The input email address. | |
| 64 | +| is_disposable | Whether the email address is a temporary one from a disposable email provider. Return values: True, False | |
| 65 | +| credits_available | The number of credits left to perform validations. | |
| 66 | +
|
| 67 | +
|
| 68 | +**Error Response Parameters** |
| 69 | +| Field Name | Description | |
| 70 | +|-----------|------------| |
| 71 | +| error.error_code | The error code if there is any error. See error table in the [Error Codes](reference.md) section. | |
| 72 | +| error.error_message | The error message if there is any error. See error table in the [Error Codes](reference.md) section. | |
| 73 | +
|
| 74 | +``` |
| 75 | + |
| 76 | +```{py:function} is_free_email(email) |
| 77 | +Validate whether an email address is a free email or not. |
| 78 | +
|
| 79 | +:param str email: (Required) The email address. |
| 80 | +
|
| 81 | +:return: Returns the validation result in JSON object. |
| 82 | +:rtype: Object |
| 83 | +
|
| 84 | +**Successful Response Parameters** |
| 85 | +| Field Name | Description | |
| 86 | +|-----------|------------| |
| 87 | +| email_address | The input email address. | |
| 88 | +| is_free | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False | |
| 89 | +| credits_available | The number of credits left to perform validations. | |
| 90 | +
|
| 91 | +
|
| 92 | +**Error Response Parameters** |
| 93 | +| Field Name | Description | |
| 94 | +|-----------|------------| |
| 95 | +| error.error_code | The error code if there is any error. See error table in the [Error Codes](reference.md) section. | |
| 96 | +| error.error_message | The error message if there is any error. See error table in the [Error Codes](reference.md) section. | |
| 97 | +
|
| 98 | +``` |
| 99 | + |
0 commit comments