utilities.checkEmail
    • 1 Minute to read
    • Dark
      Light

    utilities.checkEmail

    • Dark
      Light

    Article summary

    General Information

    Use this method to quickly validate an email address, or optionally, a domain.

    Arguments

    Field

    Description

    Field Type

    Required

    Example

    email

    The email address to be validated

    string

    Yes

    jsmith@example.com

    domain_only

    A boolean value that if set to 1 requests just that the domain of the email address be validated

    boolean

    No

    1

    mx_check

    A boolean value that if set to 1 requests that the MX record of the email address' domain be validated

    boolean

    No

    1

    Response

    Field

    Description

    Example

    valid

    A boolean value indicating if the email address (or domain) is valid

    0 – invalid


    1 – valid

    email

    The email address that has been validated; it will be the same as the one passed in the POST

    jsmith@example.com

    Response Codes

    Error Condition

    responseText

    responseData

    Missing <email> element or blank value is POSTed

    Missing variables

    <missing_vars>email</missing_vars>

    The email address being checked is not a valid one

    Invalid

    <valid>0</valid>


    <email>{the email address being checked}</email>

    Example Post

    <methodCall>
    <methodName>utilities.checkemail</methodName>
    <email>nobody@Mapp.com</email>
    <mx_check>1</mx_check>
    </methodCall>

    Example Response

    <methodResponse>
    <item>
    <methodName>utilities.checkemail</methodName>
    <responseText>Valid: MX Records found for this domain</responseText>
    <responseData>
    <valid>1</valid>
    <email>adam@bandfarm.com</email>
    </responseData>
    <responseNum>1</responseNum>
    </item>
    </methodResponse>


    Was this article helpful?