Utility Features - POP3 Client

Validate Mail Server Credentials

The ValidateCredentials method of Aspose.Email API makes the validation of mail server credentials possible without sending an email. This method is responsible for verifying the authenticity and validity of the provided email credentials, being used for authentication when connecting to the server.

It verifies that the email credentials, such as username and password, are valid and that it is possible for the client to establish a successful connection to the server. This verification of credentials helps ensure that the client can securely access the email account and perform various operations, such as receiving email.

using (Pop3Client client = new Pop3Client(server.Pop3Url, server.Pop3Port, "userName", "password", SecurityOptions.Auto))
{
    client.Timeout = 4000;
   
    if (client.ValidateCredentials())
    {
        //to do something
    }
}

To perform an asynchronous operation, there is also a version of the method ValidateCredentialsAsync.