Skip to content

Commit e4f01fa

Browse files
author
MailboxValidator
committed
Update readme.md
1 parent 1e67554 commit e4f01fa

File tree

1 file changed

+2
-129
lines changed

1 file changed

+2
-129
lines changed

readme.md

Lines changed: 2 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -11,135 +11,8 @@ This module can be useful in many types of projects, for example
1111
- to perform fraud check
1212
- and so on
1313

14-
# Installation
15-
16-
Just add `mailboxvalidator = "1.1.0"` into your *Cargo.toml*.
17-
18-
# Dependencies
19-
20-
An API key is required for this module to function.
21-
22-
Go to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.
23-
24-
# Functions
25-
26-
## validate_email(email_address)
27-
28-
Performs email validation on the supplied email address.
29-
30-
### Return Fields
31-
32-
| Field Name | Description |
33-
| ---------------------- | ------------------------------------------------------------ |
34-
| email_address | The input email address. |
35-
| domain | The domain of the email address. |
36-
| is_free | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False |
37-
| is_syntax | Whether the email address is syntactically correct. Return values: True, False |
38-
| is_domain | Whether the email address has a valid MX record in its DNS entries. Return values: True, False, - (- means not applicable) |
39-
| is_smtp | Whether the mail servers specified in the MX records are responding to connections. Return values: True, False, - (- means not applicable) |
40-
| is_verified | Whether the mail server confirms that the email address actually exist. Return values: True, False, - (- means not applicable) |
41-
| is_server_down | Whether the mail server is currently down or unresponsive. Return values: True, False, - (- means not applicable) |
42-
| 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) |
43-
| is_disposable | Whether the email address is a temporary one from a disposable email provider. Return values: True, False, - (- means not applicable) |
44-
| is_suppressed | Whether the email address is in our blacklist. Return values: True, False, - (- means not applicable) |
45-
| is_role | Whether the email address is a role-based email address like [admin@example.net](mailto:admin@example.net) or [webmaster@example.net](mailto:webmaster@example.net). Return values: True, False, - (- means not applicable) |
46-
| is_high_risk | Whether the email address contains high risk keywords. Return values: True, False, - (- means not applicable) |
47-
| is_catchall | Whether the email address is a catch-all address. Return values: True, False, Unknown, - (- means not applicable) |
48-
| mailboxvalidator_score | Email address reputation score. Score > 0.70 means good; score > 0.40 means fair; score <= 0.40 means poor. |
49-
| time_taken | The time taken to get the results in seconds. |
50-
| status | Whether our system think the email address is valid based on all the previous fields. Return values: True, False |
51-
| credits_available | The number of credits left to perform validations. |
52-
| error_code | The error code if there is any error. See error table in the below section. |
53-
| error_message | The error message if there is any error. See error table in the below section. |
54-
55-
## is_disposable_email(email_address)
56-
57-
Check if the supplied email address is from a disposable email provider.
58-
59-
### Return Fields
60-
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-
| error_code | The error code if there is any error. See error table in the below section. |
67-
| error_message | The error message if there is any error. See error table in the below section. |
68-
69-
## is_free_email(email_address)
70-
71-
Check if the supplied email address is from a free email provider.
72-
73-
### Return Fields
74-
75-
| Field Name | Description |
76-
| ----------------- | ------------------------------------------------------------ |
77-
| email_address | The input email address. |
78-
| is_free | Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False |
79-
| credits_available | The number of credits left to perform validations. |
80-
| error_code | The error code if there is any error. See error table in the below section. |
81-
| error_message | The error message if there is any error. See error table below. |
82-
83-
# Sample Codes
84-
85-
## Validate email
86-
87-
```rust
88-
use mailboxvalidator;
89-
90-
let validation_result = mailboxvalidator::validate_email("example@example.com",PASTE_API_KEY_HERE);
91-
92-
match validation_result {
93-
Ok(num) => {
94-
let ok_result = num;
95-
println!("{:#?}", ok_result);
96-
},
97-
Err(err) => println!("{:#?}", err),
98-
};
99-
```
100-
101-
## Check if an email is from a disposable email provider
102-
103-
```rust
104-
use mailboxvalidator;
105-
106-
let validation_result = mailboxvalidator::is_disposable_email("example@example.com",PASTE_API_KEY_HERE);
107-
108-
match validation_result {
109-
Ok(num) => {
110-
let ok_result = num;
111-
println!("{:#?}", ok_result);
112-
},
113-
Err(err) => println!("{:#?}", err),
114-
};
115-
```
116-
117-
## Check if an email is from a free email provider
118-
119-
```rust
120-
use mailboxvalidator;
121-
122-
let validation_result = mailboxvalidator::is_free_email("example@example.com",PASTE_API_KEY_HERE);
123-
124-
match validation_result {
125-
Ok(num) => {
126-
let ok_result = num;
127-
println!("{:#?}", ok_result);
128-
},
129-
Err(err) => println!("{:#?}", err),
130-
};
131-
```
132-
133-
# Errors
134-
135-
| error_code | error_message |
136-
| ---------- | --------------------- |
137-
| 10000 | Missing parameter. |
138-
| 10001 | API key not found. |
139-
| 10002 | API key disabled. |
140-
| 10003 | API key expired. |
141-
| 10004 | Insufficient credits. |
142-
| 10005 | Unknown error. |
14+
# Developer Documentation
15+
To learn more about installation, usage, and code examples, please visit the developer documentation at [https://mailboxvalidator-rust.readthedocs.io/en/latest/index.html.](https://mailboxvalidator-rust.readthedocs.io/en/latest/index.html)
14316

14417
# Copyright
14518

0 commit comments

Comments
 (0)