Hi,
I am trying to validate email address entered by the users in the front end for the validity. I have tried EmailValidator in the Network namespace and it does not like it works.
I am getting the following error:
the mail address is invalid,for the Mail server error found in the mail validati
on Last Exception: No connection could be made because the target machine active
ly refused it 74.125.95.27:25
Here is the code:
var lic = new Aspose.Network.License();
lic.SetLicense(@"C:\Aspose.Total.lic");
var ev = new EmailValidator();
ValidationResult result;
ev.Validate("testuser@gmail.com", out result);
if (result.ReturnCode == ValidationResponseCode.ValidationSuccess)
{
Console.WriteLine("the email address is valid.");
}
else
{
Console.WriteLine("the mail address is invalid,for the {0}", result.Message);
}
Thanks
-Balaji