MailboxValidator Kotlin API#

SingleValidation Class#

class SingleValidation(api_key)#

Creates a new instance of the MailboxValidator object with the MailboxValidator API key.

Parameters:

api_key (str) – (Required) MailboxValidator API key.

validateEmail(email)#

Validate whether an email address is a valid email or not.

Parameters:

email (str) – (Required) The email address.

Returns:

Returns the validation result in an object.

Return type:

Object

Successful Response Parameters

Field Name

Description

emailAddress

The input email address.

baseEmailAddress

The input email address after sanitizing the username of the dots (only Gmail) and subaddressing.

domainName

The domain of the email address.

isFree

Whether the email address is from a free email provider like Gmail or Hotmail. Return values: true, false, null (null means not applicable)

isSyntax

Whether the email address is syntactically correct. Return values: true, false

isDomain

Whether the email address has a valid MX record in its DNS entries. Return values: true, false, null (null means not applicable)

isSMTP

Whether the mail servers specified in the MX records are responding to connections. Return values: true, false, null (null means not applicable)

isVerified

Whether the mail server confirms that the email address actually exist. Return values: true, false, null (null means not applicable)

isServerDown

Whether the mail server is currently down or unresponsive. Return values: true, false, null (null means not applicable)

isGreylisted

Whether the mail server employs greylisting where an email has to be sent a second time at a later time. Return values: true, false, null (null means not applicable)

isDisposable

Whether the email address is a temporary one from a disposable email provider. Return values: true, false, null (null means not applicable)

isSuppressed

Whether the email address is in our blacklist. Return values: true, false, null (null means not applicable)

isRole

Whether the email address is a role-based email address like admin@example.net or webmaster@example.net. Return values: true, false, null (null means not applicable)

isHighRisk

Whether the email address contains high risk keywords. Return values: true, false, null (null means not applicable)

isCatchall

Whether the email address is a catch-all address. Return values: true, false, null (null means not applicable)

isDMARCEnforced

Whether the email domain is enforcing DMARC. Return values: true, false

isStrictSPF

Whether the email domain is using strict SPF. Return values: true, false

websiteExist

Whether the email domain is a reachable website. Return values: true, false

mailboxValidatorScore

Email address reputation score. Score > 0.70 means good; score > 0.40 means fair; score <= 0.40 means poor.

timeTaken

The time taken to get the results in seconds.

status

Whether our system think the email address is valid based on all the previous fields. Return values: True, False

creditsAvailable

The number of credits left to perform validations.

Error Response Parameters

Field Name

Description

errorCode

The error code if there is any error. See error table in the Error Codes section.

errorMessage

The error message if there is any error. See error table in the Error Codes section.

disposableEmail(email)#

Validate whether an email address is a disposable email or not.

Parameters:

email (str) – (Required) The email address.

Returns:

Returns the validation result in an object.

Return type:

Object

Successful Response Parameters

Field Name

Description

emailAddress

The input email address.

isDisposable

Whether the email address is a temporary one from a disposable email provider. Return values: True, False

creditsAvailable

The number of credits left to perform validations.

Error Response Parameters

Field Name

Description

errorCode

The error code if there is any error. See error table in the Error Codes section.

errorMessage

The error message if there is any error. See error table in the Error Codes section.

freeEmail(email)#

Validate whether an email address is a free email or not.

Parameters:

email (str) – (Required) The email address.

Returns:

Returns the validation result in an object.

Return type:

Object

Successful Response Parameters

Field Name

Description

emailAddress

The input email address.

isFree

Whether the email address is from a free email provider like Gmail or Hotmail. Return values: True, False

creditsAvailable

The number of credits left to perform validations.

Error Response Parameters

Field Name

Description

errorCode

The error code if there is any error. See error table in the Error Codes section.

errorMessage

The error message if there is any error. See error table in the Error Codes section.