com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class EmailValidator



  • public final class EmailValidator
    extends Object

    EmailValidator class provides the capability to validate e-mail addresses.

    • Constructor Detail

      • EmailValidator

        public EmailValidator()

        Create an instance of EmailValidator.

    • Method Detail

      • getDnsServers

        public final String[] getDnsServers()

        Gets or sets the Dns server list to use in the email validation.

      • setDnsServers

        public final void setDnsServers(String[] value)

        Gets or sets the Dns server list to use in the email validation.

      • getTimeout

        public final int getTimeout()

        Gets or sets the length of time (in milliseconds) until the request times out.

      • setTimeout

        public final void setTimeout(int value)

        Gets or sets the length of time (in milliseconds) until the request times out.

      • validate

        public final void validate(String mailAddress,
                    int policy,
                    ValidationResult[] result)

        Validating the email address

        Parameters:
        mailAddress - The mail address to be validated.
        policy - The policy of the validating process.
        result - The result of the validating process.
      • validate

        public final void validate(String mailAddress,
                    ValidationResult[] result)

        Validate email address, with the MailServer validation policy.

        Parameters:
        mailAddress - The Email address to be validated.
        result - The result of the validation.
      • beginValidate

        public final com.aspose.ms.System.IAsyncResult beginValidate(String mailAddress,
                                                      int policy,
                                                      ValidationResult[] result,
                                                      com.aspose.ms.System.AsyncCallback asyncCallback,
                                                      Object stateObject)

        Begins an asynchronous validating process for an email address.

        Parameters:
        mailAddress - The email address to be validated.
        policy - The policy of the validating process.
        result - The result of the validating process.
        asyncCallback - The AsyncCallback delegate
        stateObject - An object that contains state information for this request.
        Returns:
        An IAsyncResult that references the asynchronous connection.
      • endValidate

        public final void endValidate(ValidationResult[] validationResult,
                       com.aspose.ms.System.IAsyncResult asyncResult)

        Ends an asynchronous validating process for an email address.

        Parameters:
        validationResult - The result of the validating process.
        asyncResult - An IAsyncResult that stores state information and any user defined data for this asynchronous operation.

Copyright (c) 2008-2019 Aspose Pty Ltd. All Rights Reserved.