Skip to content

Commit 1537208

Browse files
Update README.md
1 parent 9354111 commit 1537208

File tree

1 file changed

+77
-207
lines changed

1 file changed

+77
-207
lines changed

README.md

Lines changed: 77 additions & 207 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
MailboxValidator Ruby Module
22
============================
33

4-
This Ruby module provides an easy way to call the MailboxValidator API which validates if an email address is a valid one.
4+
This Ruby module enables user to easily validate if an email address is valid, a type of disposable email or free email.
55

6-
This module can be used in many types of projects such as:
6+
This module can be useful in many types of projects, for example:
77

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
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
1112

1213
Installation
1314
============
1415

1516
To install this module type the following:
1617

17-
gem install mailboxvalidator-ruby
18+
`gem install mailboxvalidator-ruby`
1819

1920
Dependencies
2021
============
@@ -23,8 +24,73 @@ An API key is required for this module to function.
2324

2425
Go to https://www.mailboxvalidator.com/plans#api to sign up for a FREE API plan and you'll be given an API key.
2526

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

2995
```ruby
3096
require "mailboxvalidator_ruby"
@@ -64,131 +130,8 @@ end
64130

65131
```
66132

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

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

193136
```ruby
194137
require "mailboxvalidator_ruby"
@@ -213,45 +156,8 @@ end
213156

214157
```
215158

216-
Functions
217-
=========
218-
219-
### new()
220-
221-
Creates a new instance of the MailboxValidator object.
222-
223-
### disposable_email(email_address)
224-
225-
Checks if the supplied email address is from a disposable email provider.
226-
227-
Result Fields
228-
=============
229-
230-
### email_address
231-
232-
The input email address.
233159

234-
### is_disposable
235-
236-
Whether the email address is a temporary one from a disposable email provider.
237-
238-
Return values: True, False
239-
240-
### credits_available
241-
242-
The number of credits left to perform validations.
243-
244-
### error_code
245-
246-
The error code if there is any error. See error table below.
247-
248-
### error_message
249-
250-
The error message if there is any error. See error table below.
251-
252-
253-
Usage for checking if email is from a free email provider
254-
=========================================================
160+
## Check if an email is from a free email provider
255161

256162
```ruby
257163
require "mailboxvalidator_ruby"
@@ -276,42 +182,6 @@ end
276182

277183
```
278184

279-
Functions
280-
=========
281-
282-
### new()
283-
284-
Creates a new instance of the MailboxValidator object.
285-
286-
### free_email(email_address)
287-
288-
Checks if the supplied email address is from a free email provider.
289-
290-
Result Fields
291-
=============
292-
293-
### email_address
294-
295-
The input email address.
296-
297-
### is_free
298-
299-
Whether the email address is from a free email provider like Gmail or Hotmail.
300-
301-
Return values: True, False
302-
303-
### credits_available
304-
305-
The number of credits left to perform validations.
306-
307-
### error_code
308-
309-
The error code if there is any error. See error table below.
310-
311-
### error_message
312-
313-
The error message if there is any error. See error table below.
314-
315185

316186
Errors
317187
======
@@ -328,4 +198,4 @@ Errors
328198
Copyright
329199
=========
330200

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

0 commit comments

Comments
 (0)