mailboxvalidator = "1.0.0"
use mailboxvalidator;
let validation_result = mailboxvalidator::validate_email("example@example.com",PASTE_API_KEY_HERE);
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),
};
use mailboxvalidator;
let validation_result = mailboxvalidator::is_disposable_email("example@example.com",PASTE_API_KEY_HERE);
match validation_result {
Ok(num) => {
let ok_result = num;
assert_eq!(ok_result["is_disposable"], "True");
assert_eq!(ok_result["error_code"], "");
},
Err(err) => println!("{:#?}", err),
};
use mailboxvalidator;
let validation_result = mailboxvalidator::is_free_email("example@example.com",PASTE_API_KEY_HERE);
match validation_result {
Ok(num) => {
let ok_result = num;
assert_eq!(ok_result["is_free"], "False");
assert_eq!(ok_result["error_code"], "");
},
Err(err) => println!("{:#?}", err),
};