ValidateEmail

更新时间:
复制 MD 格式

Validate an email address.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

dm:ValidateEmail

none

*All Resource

*

None None

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

Email

string

Yes

The email address to validate

xxx@yyy.com

Timeout

integer

No

Timeout period. Default value: 60 seconds.

20

CheckGraylist

boolean

No

Specifies whether to check the graylist. Default value: false. Results will be sent as asynchronous notifications through EventBridge.

true

ProbeType

string

No

The detection type:

  • FULL: Enables all detection capabilities, including SMTP probing. Since SMTP probing involves remote connections, the overall latency is higher. This is suitable for scenarios that are not sensitive to response time. Each detection consumes 1 address validation quota.

  • BASIC_ONLY: Enables all detection capabilities except SMTP probing, with low latency. This is suitable for scenarios sensitive to response time, such as real-time validation during registration to check whether an email address is a disposable email or an abnormal address such as MX forwarding, to defend against mass registration by malicious actors. Each detection consumes 1/3 of an address validation quota.

FULL

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Request ID

xxxx-xxxx-xxxx-xxxx

Status

string

The email address status obtained from validation

Valid values:

  • VALID :

    Valid address

  • CATCHALL :

    CatchAll address, indicating the domain accepts emails sent to all non-existent mailbox addresses under this domain

  • UNKNOWN :

    Unknown status address

  • INVALID :

    Invalid address

  • DONOTMAIL :

    Abnormal address, can be excluded in marketing scenarios

VALID

SubStatus

string

The email address sub-status obtained from validation, which provides a detailed description of the status

Valid values:

  • NO_DNS_ENTRIES :

    Invalid address, no DNS records

  • MISSPELLED :

    Invalid address, misspelled

  • DOES_NOT_ACCEPT_MAIL :

    Invalid address, the mail server does not accept mail

  • MAILBOX_NOT_EXISTS :

    Invalid address, the mailbox does not exist

  • SYSTEM_ERROR :

    Unknown status, system error

  • MX_FORWARD :

    Abnormal address, MX forwarding

  • SYNTAX_INVALID :

    Invalid address, syntax error

  • ROLE_ACCOUNT :

    Abnormal address, role account, such as role@, info@, contact@, etc.

  • SMTP_CONNECT_FAILED :

    Unknown status, failed to connect to the remote SMTP server

  • DISABLED :

    Invalid address, the mailbox has been disabled

  • UNSPECIFIED :

    Unspecified, may be returned for Valid, CatchAll, or Unknown status

  • IP_UNROUTABLE :

    Invalid address, the mail server IP is unreachable

  • GRAY_LIST :

    Unknown status, graylist

  • MAILBOX_FULL :

    Invalid address, the mailbox is full

  • DISPOSABLE :

    Abnormal address, disposable email, blocklist

  • TIMEOUT_EXCEEDED :

    Unknown status, exceeded the specified timeout

UNSPECIFIED

Provider

string

Email provider classification of the address

Valid values:

  • Others :

    Others

  • Yahoo :

    Yahoo

  • Gmx :

    Gmx

  • MailDotCom :

    MailDotCom

  • Tencent :

    Tencent

  • Gmail :

    Gmail

  • Outlook :

    Outlook

  • Zoho :

    Zoho

  • Proton :

    Proton

  • Netease :

    Netease

  • Icloud :

    Icloud

  • Webde :

    Webde

Gmail

IsFreeMail

boolean

Indicates whether the address is a free email

Valid values:

  • true :

    true

  • false :

    false

true

LocalPart

string

The local part of the email address parsed from syntax validation (lowercased with the plus sign portion removed)

xxx

DomainPart

string

The domain part of the email address parsed from syntax validation (lowercased)

yyy.com

Examples

Success response

JSON format

{
  "RequestId": "xxxx-xxxx-xxxx-xxxx",
  "Status": "VALID",
  "SubStatus": "UNSPECIFIED",
  "Provider": "Gmail",
  "IsFreeMail": true,
  "LocalPart": "xxx",
  "DomainPart": "yyy.com"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.