We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Why the Gmail account is not validated by Aspose.Email?

I want to verify my Gmail account, but Email validator always fails to verify it. What can be the reason?

Hi Cornelius,

I have analyzed the scenario but could not re-produce the issue here. I used following code for testing and it always validates my Gmail test accounts.

string emailToTest = "username@gmail.com";
EmailValidator ev = new EmailValidator();
ValidationResult result = new ValidationResult();
ev.Validate(emailToTest, ValidationPolicy.MailServer, out result);
if (result.ReturnCode == ValidationResponseCode.ValidationSuccess)
Console.WriteLine(“MailServer passed”);
Console.WriteLine(“MailServer failed”);

ev.Validate(emailToTest, ValidationPolicy.SyntaxAndDomain, out result);
if (result.ReturnCode == ValidationResponseCode.ValidationSuccess)
Console.WriteLine(“SyntaxAndDomain passed”);
Console.WriteLine(“SyntaxAndDomain failed”);

ev.Validate(emailToTest, ValidationPolicy.SyntaxOnly, out result);
if (result.ReturnCode == ValidationResponseCode.ValidationSuccess)
Console.WriteLine(“SyntaxOnly passed”);
Console.WriteLine(“SyntaxOnly failed”);
Could you please give a try to this sample code and let us know your feedback? It will help us to identify the problem and provide assistance in a better way.

Thanks for your cooperation and understanding.