sergiotome
New member
- Joined
- Dec 10, 2007
- Messages
- 1
- Programming Experience
- 3-5
Hi everybody,
I have a web site running on .net 1.1 but I have an interface with a 3rd party product where through a web service I pass an email address and some additional information and will generate a send surveys to selected customers. This 3rd party product runs on .net 2.0 and uses the System.Net.Mail.MailAddress class to validate whether an email address is valid or not, something like this:
System.Net.Mail.MailAddress mailAddress;
try
{
mailAddress = new System.Net.Mail.MailAddress(emailReceiver);
}
catch (System.FormatException e)
{
//"No of invalid email addresses found in this batch job" displayed in tasklog is bumped up
//Email is not created
//return
}
What I would like to do it to recreate that exact same validation but using the object available in the 1.1 framework. Does anyone know how the System.Net.Mail.MailAddress class validates whether an email address is valid or not? do they use some sort of regular expression available anywhere?
Thanks,
Sergio
I have a web site running on .net 1.1 but I have an interface with a 3rd party product where through a web service I pass an email address and some additional information and will generate a send surveys to selected customers. This 3rd party product runs on .net 2.0 and uses the System.Net.Mail.MailAddress class to validate whether an email address is valid or not, something like this:
System.Net.Mail.MailAddress mailAddress;
try
{
mailAddress = new System.Net.Mail.MailAddress(emailReceiver);
}
catch (System.FormatException e)
{
//"No of invalid email addresses found in this batch job" displayed in tasklog is bumped up
//Email is not created
//return
}
What I would like to do it to recreate that exact same validation but using the object available in the 1.1 framework. Does anyone know how the System.Net.Mail.MailAddress class validates whether an email address is valid or not? do they use some sort of regular expression available anywhere?
Thanks,
Sergio