📧 Email Validation

Validate emails.

A better, simpler way to validate emails with Dymo API in a single line of code!

About Email Validation

What is Email Validation?

Please note that this feature may depend on plugins to function correctly.

Usage

Once we have created and configured our API object, it is quite simple, we just need to execute the following code.

import DymoAPI from "dymo-api";

const dymoClient = new DymoAPI({
  apiKey: ""
});

const decision = await dymoClient.isValidEmail("[email protected]");
import DymoAPI from "dymo-api";

const dymoClient = new DymoAPI({
  apiKey: "",
  rules: {
      email: {
          // These are the default rules defined for email validation.
          deny: ["FRAUD", "INVALID", "NO_MX_RECORDS", "NO_REPLY_EMAIL"]
      }
  }
});

const decision = await dymoClient.isValidEmail("[email protected]");
import DymoAPI from "dymo-api";

const dymoClient = new DymoAPI({
  apiKey: "",
  rules: {
      email: {
          // These are the default rules defined for email validation.
          deny: ["FRAUD", "INVALID", "NO_MX_RECORDS", "NO_REPLY_EMAIL"]
      }
  }
});

// You can overwrite the predefined rules at any time.
const decision = await dymoClient.isValidEmail("[email protected]", { deny: ["NO_REACHABLE"] });

Email Rules

RuleDefaultPremiumDescription
FRAUDFraud detection
INVALIDInvalid email format
NO_MX_RECORDSMX records check
PROXIED_EMAILEmail using proxy detection
FREE_SUBDOMAINEmail from free subdomain
PERSONAL_EMAILPersonal email vs corporate
CORPORATE_EMAILCorporate email verification
NO_REPLY_EMAILDetect no-reply email addresses
ROLE_ACCOUNTRole-based email detection
NO_GRAVATARGravatar profile detection
NO_REACHABLEEmail unreachable
HIGH_RISK_SCOREHigh risk score detection

Response

The more data types you add, the longer the response time will be.
{
    email: "[email protected]",
    allow: true,
    reasons: [],
    response: {
        valid: true,
        fraud: false, // Also for disposable data.
        proxiedEmail: false, // Recommendation: Block users who proxy their email.
        freeSubdomain: false,
        corporate: true,
        email: "[email protected]",
        realUser: "admin",
        didYouMean: null, // Return a possible email you refer to.
        noReply: false,
        customTLD: false,
        domain: "lamoncloa.gob.es",
        roleAccount: true,
        plugins: {...}
    }
}