We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

Email Validations

Article Preview

    Overview

    So you've decided to take the step to implement our Email Validation API. A good place to get started is to test the Email Validation API in the Mailgun Control Panel.  This way, you can quickly and easily submit validations and view the JSON response from the API. 

    If your account has it, the Validations option will be on the left-hand navigation pane of your Control Panel.

     

    Deciphering the clues

    So, once you've validated an address, what does the response mean? Let's take a look at the parameters in the JSON response. 

    • address - Address being validated
    • did_you_mean - A suggested alternatively based on common misspellings or typos
    • is_disposable_address - Returns true if the domain is a known disposable email address
    • is_role_address - Returns true if the address is role-based, e.g. support@example.com or info@example.com
    • is_valid - Checks the email against known provider rule list and returns false if a violation occurs
    • mailbox_verification - Result of the mailbox validation check with the ESP. Does not affect is_valid
    • parts - Parsed segments of the email address
    • reason - Reason for address failing email validation check if applicable 

     

    Other helps for your journey

    We also have community-driven SDKs for popular programming languages to help you implement Mailgun Email Validation into your project. 

    You are now ready to begin making API calls to start validating email addresses. To see the full technical details on how to implement and make calls to the Email Validation API, please see our technical documentation here

     

    FAQ

     

    What is the difference between private and public validation endpoint?

    The public endpoint is meant to be used within front-end applications (and is only available on version 3 of the Validations API). To protect the public API Key it has an initial monthly limit that can be adjusted. The private endpoint is meant for back-end applications and does not have this limitation.  

     

    What account user roles can perform email validations?

    Only users with admin and developer roles can perform email validations using the account. Users with the support, billing, or analyst roles cannot perform email validations.

     

    How can I limit the number of public validations my account can perform?

    By navigating to your Account Settings, you can set the Public Validation Limit field as pictured below:

    Screenshot_2023-02-24_at_11.45.24_PM.png

     

    What is the difference between is_valid and mailbox_verification?

    is_valid is the result of the ESP-specific syntax check, while mailbox_verification makes a call to the ESP to see if the mailbox actually exists. 

     

    Why is mailbox_verification null? 

    Mailbox Verification by default is disabled.  It needs to be enabled in the API call by passing the parameter "mailbox_verification=true".  

    If mailbox_verification is disabled it will return null, true if mailbox_verification passes, and false if it does not pass.  It will also return unknown if the SMTP session could not be completed or if the ESP does not support mailbox verification. 

     

    Why is is_valid true and mailbox_verification false? 

    The mailbox verification results do not have an impact on is_valid.  Is_valid returns true if the address is parsable, passes known syntax checks and has a valid SMTP server, regardless of the outcome of mailbox verification. 

     

    Need Support?

    Our Support Team here at Sinch Mailgun is happy to help! Reach out to us in the Support page of your Mailgun Control Panel, and we'll be with you shortly!