By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,118 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,118 IT Pros & Developers. It's quick & easy.

.NET 2.0 MailAddress does not support all valid email addresses

P: 1
I ran into a strange problem today. I tried to send mail to a strange but valid email address, but the MailAddress("") object choked on me. It threw a formating exception saying it was not a valid email address.

homer-..-sim-..-pson@sympatico.ca

This is not the a real account, but is a valid email address according to RFC2822
http://www.ietf.org/rfc/rfc2822.txt

I think that the two dots together are what is messing it up. Has anyone else experienced this and has a work around for ?

Thanks,
Apr 25 '07 #1
Share this Question
Share on Google+
1 Reply


TRScheel
Expert 100+
P: 638
I ran into a strange problem today. I tried to send mail to a strange but valid email address, but the MailAddress("") object choked on me. It threw a formating exception saying it was not a valid email address.

homer-..-sim-..-pson@sympatico.ca

This is not the a real account, but is a valid email address according to RFC2822
http://www.ietf.org/rfc/rfc2822.txt

I think that the two dots together are what is messing it up. Has anyone else experienced this and has a work around for ?

Thanks,
If this is in C# try this ( I dont know how to do it in VB... or if you even need to)

string MailTo = @"homer-..-sim-..-pson@sympatico.ca";

And then use the MailTo string. See if that fixes it.
Apr 25 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.