The Rust database reader allows your Rust application to use the on-premise IPQS email verification database and make informed decisions about email addresses.
- Proxy & VPN Detection API
- Email Verification API
- Phone Number Validation API
- Device Fingerprint API
- Malicious URL Scanner API
- Mobile Device Fingerprinting SDK
- Gaming Fraud Detection SDK
- Dark Web Leak API
- Malware File Scanner API
- Request List API
- Fraud Reporting API
- Account Management APIs
- Bulk Validation CSV API
- Allowlist & Blocklist APIs
- Plugins Platforms & Integrations
- IP Reputation Database
- Email Verification Database
- Custom Integrations
- Country List API
Rust Database Reader
About the Rust Database Reader
Installation
Run the following Cargo command in your project directory:
cargo add ipqs_email_db_reader
Usage
The following example shows how you can use the Rust database reader in your application to retrieve data about a specific email address.
Make sure to include the release option cargo build --release when compiling, as this will greatly speed up searches.
x
1
let mut email = String::new("noreply@ipqs.com");
2
3
let email_lookup = EmailLookup {
4
path: String::from("./tree/"),
5
};
6
7
loop {
8
println!("Searching for: {}", email);
9
10
match email_lookup.lookup_email(email) {
11
Some(data) => {
12
println!("Found data: {:?}", data);
13
}
14
None => {
15
println!("Not found");
16
}
17
}
18
}
Methods
Some of these methods may be unavailable depending on which database file you receive. If the method in question is unavailable in your database, the method will return Option::None .
Method | Description |
pub fn valid(&self) -> Option<bool> | Does this email address appear valid? |
pub fn disposable(&self) -> Option<bool> | Is this email suspected of belonging to a temporary or disposable mail service? Usually associated with fraudsters and scammers. |
pub fn smtp_score(&self) -> Option<u8> | Validity score of email server's SMTP setup. Range: "0" to "3". 0x00 = mail server exists, but is rejecting all mail 0x01 = mail server exists, but is showing a temporary error 0x02 = mail server exists, but accepts all email 0x03 = mail server exists and has verified the email address |
pub fn suspect(&self) -> Option<bool> | This value indicates if the mail server is currently replying with a temporary mail server error or if the email verification system is unable to verify the email address due to a broken SMTP handshake. This status will also be true for "catch all" email addresses as defined below. If this value is true, then we suspect the "valid" result may be tainted and there is not a guarantee that the email address is truly valid. This status is rarely true for popular mailbox providers and typically only returns as true for a small percentage of business mail servers. |
pub fn catch_all(&self) -> Option<bool> | Is this email likely to be a "catch all" where the mail server verifies all emails tested against it as valid? It is difficult to determine if the address is truly valid in these scenarios, since the email's server will not confirm the account's status. |
pub fn deliverability(&self) -> Option<u8> | How likely is this email to be delivered to the user and land in their mailbox. Values can be "high", "medium", "low" or "none". 0x00 = none 0x01 = low 0x02 = medium 0x03 = high |
pub fn fraud_score(&self) -> Option<i32> | The overall Fraud Score of the user based on the email's verification and recent behavior across the IPQS threat network. Fraud Scores >= 75 are suspicious, but not necessarily fraudulent. |
pub fn leaked(&self) -> Option<bool> | Was this email address associated with a recent database leak from a third party? Leaked accounts pose a risk as they may have become compromised during a database breach. |
pub fn recent_abuse(&self) -> Option<bool> | This value will indicate if there has been any recently verified abuse across our network for this email address. Abuse could be a confirmed chargeback, fake signup, compromised device, fake app install, or similar malicious behavior within the past few days. |
pub fn user_velocity(&self) -> Option<u8> | Frequency at which this email address makes legitimate purchases, account registrations, and engages in legitimate user behavior online. Values can be "high", "medium", "low", or "none". Values of "high" or "medium" are strong signals of healthy usage. New email addresses without a history of legitimate behavior will have a value as "none". This field is restricted to higher plan tiers. |
pub fn first_seen(&self) -> Option<u8> | When this email address was first seen online. |
pub fn domain_age(&self) -> Option<u8> | Date when this domain was registered. |
pub fn domain_common(&self) -> Option<bool> | Is this email from common free email providers? ("gmail.com", "yahoo.com", "hotmail.com", etc.) |
pub fn domain_velocity(&self) -> Option<u8> | Indicates the level of legitimate users interacting with the email address domain. Values can be "high", "medium", "low", or "none". Domains like "IBM.com", "Microsoft.com", "Gmail.com", etc. will have "high" scores as this value represents popular domains. New domains or domains that are not frequently visited by legitimate users will have a value as "none". This field is restricted to upgraded plans. |
pub fn domain_disposable(&self) -> Option<bool> | Is this domain suspected of belonging to a temporary or disposable mail service? Usually associated with fraudsters and scammers. |