Expand description
Package to use MailboxValidator API for email validation. It enables user to easily validate if an email address is valid, a type of disposable email or free email.
This module can be useful in many types of projects, for example
- to validate an user’s email during sign up
- to clean your mailing list prior to email sending
- to perform fraud check
- and so on
You can get a free API key from here: https://www.mailboxvalidator.com/plans#api.
§Example
use mailboxvalidator;
let validation_result = mailboxvalidator::validate_email("example@example.com",YOUR_API_KEY);
match validation_result {
Ok(num) => {
let ok_result = num;
assert_eq!(ok_result["status"], "False");
assert_eq!(ok_result["error_code"], "");
},
Err(err) => println!("{:#?}", err),
};
Structs§
- Disposable
Email Record - MailboxValidator Disposable Email API result record.
- Error
Record - MailboxValidator Error object
- Error
Record1 - MailboxValidator Error Response object
- Free
Email Record - MailboxValidator Free Email API result record.
- ReqError
- The Errors that may occur when processing a
Request
. - Single
Email Validation Record - MailboxValidator Single Validation API result record.
Functions§
- is_
disposable_ email - Validates email address using MailboxValidator Disposable Email API.
- is_
free_ email - Validates email address using MailboxValidator Free Email API.
- validate_
email - Validates email address using MailboxValidator Single Validation API.
Type Aliases§
- Mailbox
Validator Result - ! Wrapper result type returning
reqwest
errors