What possible errors could I expect to recieve in System.Net.Mail.SendCompletedEventHandler?
I am using the SendAsync method to send some emails out. What different errors could possibly be returned in the AsyncCompletedEv开发者_运维技巧entArgs in the SendCompletedEventHandler? Is there recommended practices for handling these?
Anything is possible here, you might be trying to talk to a particularly cranky SMTP server. You can't handle errors in your code, your code can't change the way the server works. It takes a human to figure out why the server doesn't like your message. The error codes that can be returned by an SMTP server are otherwise documented, review the SmtpStatusCode enum.
精彩评论