@@ -23,8 +23,8 @@ An api key is required for this module to function.
2323
2424Go to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan and you'll be given an API key.
2525
26- Usage
27- =====
26+ Usage for validation email
27+ ==========================
2828
2929``` javascript
3030var mbv = require (" mailboxvalidator-nodejs" );
@@ -181,6 +181,123 @@ The error code if there is any error. See error table below.
181181
182182The error message if there is any error. See error table below.
183183
184+
185+ Usage for checking if the email is from a disposable email provider
186+ ===================================================================
187+
188+ ``` javascript
189+ var mbv = require (" mailboxvalidator-nodejs" );
190+
191+ mbv .MailboxValidator_init (" YOUR_API_KEY" );
192+
193+ mbv .
MailboxValidator_disposable_email (
" [email protected] " , mbv_read_disposable);
194+
195+ function mbv_read_disposable (err , res , data ) {
196+ if (! err && res .statusCode == 200 ) {
197+ console .log (" email_address: " + data .email_address );
198+ console .log (" is_disposable: " + data .is_disposable );
199+ console .log (" credits_available: " + data .credits_available );
200+ console .log (" error_code: " + data .error_code );
201+ console .log (" error_message: " + data .error_message );
202+ }
203+ }
204+ ```
205+
206+ Functions
207+ =========
208+
209+ ### MailboxValidator_init(api_key)
210+
211+ Creates a new instance of the MailboxValidator object with the API key.
212+
213+ ### MailboxValidator_disposable_email(email_address, callback_function)
214+
215+ Performs disposable email check on the supplied email address and a callback function.
216+
217+ Result Fields
218+ =============
219+
220+ ### email_address
221+
222+ The input email address.
223+
224+ ### is_disposable
225+
226+ Whether the email address is a temporary one from a disposable email provider.
227+
228+ Return values: True, False
229+
230+ ### credits_available
231+
232+ The number of credits left to perform validations.
233+
234+ ### error_code
235+
236+ The error code if there is any error. See error table below.
237+
238+ ### error_message
239+
240+ The error message if there is any error. See error table below.
241+
242+
243+ Usage for checking if the email is from a free email provider
244+ =============================================================
245+
246+ ``` javascript
247+ var mbv = require (" mailboxvalidator-nodejs" );
248+
249+ mbv .MailboxValidator_init (" YOUR_API_KEY" );
250+
251+ mbv .
MailboxValidator_free_email (
" [email protected] " , mbv_read_free);
252+
253+ function mbv_read_free (err , res , data ) {
254+ if (! err && res .statusCode == 200 ) {
255+ console .log (" email_address: " + data .email_address );
256+ console .log (" is_free: " + data .is_free );
257+ console .log (" credits_available: " + data .credits_available );
258+ console .log (" error_code: " + data .error_code );
259+ console .log (" error_message: " + data .error_message );
260+ }
261+ }
262+ ```
263+
264+ Functions
265+ =========
266+
267+ ### MailboxValidator_init(api_key)
268+
269+ Creates a new instance of the MailboxValidator object with the API key.
270+
271+ ### MailboxValidator_free_email(email_address, callback_function)
272+
273+ Performs free email check on the supplied email address and a callback function.
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+
184301Errors
185302======
186303
0 commit comments