How to suppress email validation when using SmtpClient and MailMessage
Posted
by Matthias
on Stack Overflow
See other posts from Stack Overflow
or by Matthias
Published on 2010-06-09T07:30:27Z
Indexed on
2010/06/09
7:52 UTC
Read the original article
Hit count: 329
When sending out emails using the SmtpClient and a MailMessage (.net 3.5) the "To" email address(es) get validated prior to sending. I've got a big stack of email addresses which have a dot (.) before the at-sign, causing a FormatException when you attempt to send the message using the SmtpClient. This is actually a good thing, because by specification a dot before the at-sign is invalid. Unfortunately, those emails exist in the real world and they get delivered, if you send them out using your preferred email client.
My question is, can email validation through the SmtpClient/MailMessage be suppressed?
© Stack Overflow or respective owner