开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜