Skip to content

Commit fab473b

Browse files
Update README.md
1 parent 3577236 commit fab473b

File tree

1 file changed

+77
-209
lines changed

1 file changed

+77
-209
lines changed

README.md

Lines changed: 77 additions & 209 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
MailboxValidator Java Class
22
============================
33

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

6-
This class 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
============
@@ -26,8 +27,74 @@ An API key is required for this class to function.
2627

2728
Go to http://www.mailboxvalidator.com/plans#api to sign up for a FREE API plan and you'll be given an API key.
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+
Sample Codes
95+
============
96+
97+
## Validate email
3198

3299
```java
33100
import com.mailboxvalidator.*;
@@ -80,131 +147,7 @@ public class Main
80147
}
81148
```
82149

83-
Functions
84-
=========
85-
86-
### SingleValidation(api_key)
87-
88-
Creates a new instance of the MailboxValidator object with the API key.
89-
90-
### ValidateEmail(email_address)
91-
92-
Performs email validation on the supplied email address.
93-
94-
Result Fields
95-
=============
96-
97-
### email_address
98-
99-
The input email address.
100-
101-
### domain
102-
103-
The domain of the email address.
104-
105-
### is_free
106-
107-
Whether the email address is from a free email provider like Gmail or Hotmail.
108-
109-
Return values: True, False
110-
111-
### is_syntax
112-
113-
Whether the email address is syntactically correct.
114-
115-
Return values: True, False
116-
117-
### is_domain
118-
119-
Whether the email address has a valid MX record in its DNS entries.
120-
121-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
122-
123-
### is_smtp
124-
125-
Whether the mail servers specified in the MX records are responding to connections.
126-
127-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
128-
129-
### is_verified
130-
131-
Whether the mail server confirms that the email address actually exist.
132-
133-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
134-
135-
### is_server_down
136-
137-
Whether the mail server is currently down or unresponsive.
138-
139-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
140-
141-
### is_greylisted
142-
143-
Whether the mail server employs greylisting where an email has to be sent a second time at a later time.
144-
145-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
146-
147-
### is_disposable
148-
149-
Whether the email address is a temporary one from a disposable email provider.
150-
151-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
152-
153-
### is_suppressed
154-
155-
Whether the email address is in our blacklist.
156-
157-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
158-
159-
### is_role
160-
161-
Whether the email address is a role-based email address like [email protected] or [email protected].
162-
163-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
164-
165-
### is_high_risk
166-
167-
Whether the email address contains high risk keywords.
168-
169-
Return values: True, False, -&nbsp;&nbsp;&nbsp;(- means not applicable)
170-
171-
### is_catchall
172-
173-
Whether the email address is a catch-all address.
174-
175-
Return values: True, False, Unknown, -&nbsp;&nbsp;&nbsp;(- means not applicable)
176-
177-
### mailboxvalidator_score
178-
179-
Email address reputation score.
180-
181-
Score > 0.70 means good; score > 0.40 means fair; score <= 0.40 means poor.
182-
183-
### time_taken
184-
185-
The time taken to get the results in seconds.
186-
187-
### status
188-
189-
Whether our system think the email address is valid based on all the previous fields.
190-
191-
Return values: True, False
192-
193-
### credits_available
194-
195-
The number of credits left to perform validations.
196-
197-
### error_code
198-
199-
The error code if there is any error. See error table below.
200-
201-
### error_message
202-
203-
The error message if there is any error. See error table below.
204-
205-
206-
Usage for checking if an email is from a disposable email provider
207-
==================================================================
150+
## Check if an email is from a disposable email provider
208151

209152
```java
210153
import com.mailboxvalidator.*;
@@ -242,45 +185,7 @@ public class Main
242185
}
243186
```
244187

245-
Functions
246-
=========
247-
248-
### SingleValidation(api_key)
249-
250-
Creates a new instance of the MailboxValidator object with the API key.
251-
252-
### DisposableEmail(email_address)
253-
254-
Check if the supplied email address is from a disposable email provider.
255-
256-
Result Fields
257-
=============
258-
259-
### email_address
260-
261-
The input email address.
262-
263-
### is_disposable
264-
265-
Whether the email address is a temporary one from a disposable email provider.
266-
267-
Return values: True, False
268-
269-
### credits_available
270-
271-
The number of credits left to perform validations.
272-
273-
### error_code
274-
275-
The error code if there is any error. See error table below.
276-
277-
### error_message
278-
279-
The error message if there is any error. See error table below.
280-
281-
282-
Usage for checking if an email is from a free email provider
283-
============================================================
188+
## Check if an email is from a free email provider
284189

285190
```java
286191
import com.mailboxvalidator.*;
@@ -318,43 +223,6 @@ public class Main
318223
}
319224
```
320225

321-
Functions
322-
=========
323-
324-
### SingleValidation(api_key)
325-
326-
Creates a new instance of the MailboxValidator object with the API key.
327-
328-
### FreeEmail(email_address)
329-
330-
Check if the supplied email address is from a free email provider.
331-
332-
Result Fields
333-
=============
334-
335-
### email_address
336-
337-
The input email address.
338-
339-
### is_free
340-
341-
Whether the email address is from a free email provider like Gmail or Hotmail.
342-
343-
Return values: True, False
344-
345-
### credits_available
346-
347-
The number of credits left to perform validations.
348-
349-
### error_code
350-
351-
The error code if there is any error. See error table below.
352-
353-
### error_message
354-
355-
The error message if there is any error. See error table below.
356-
357-
358226

359227
Errors
360228
======
@@ -371,4 +239,4 @@ Errors
371239
Copyright
372240
=========
373241

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

0 commit comments

Comments
 (0)