开发者

Which SmtpStatusCodes to use?

Which ones of these list are directly related to the smtp server going down?

http://msdn.microsoft.com/en-us/library/system.net.mail.开发者_开发技巧smtpstatuscode.aspx

If the smtp server goes down I want my program to keep trying every 30mins but want it to only happen if it is something to do with the mail server. Like if the user mail box is full well that is too bad no resending will happen.

I am guessing "SmtpException" would be all Exceptions and I really don't see a smtp Exception that is just for the mail server being down.So I am guessing I have to do a check with these smtp status codes but I am not sure which to use.

Thanks


This will depend a lot on the exact error, timing, and type of mail server. e.g. is the server shutting down as you're connected, before you connect, while you're in the middle of sending a mail ?

If the mail server cannot be connected to, you usually get the statuscode of GeneralFailure , thogh if something's going on in the middle of an operation you might get ServiceNotAvailable or ServiceClosingTransmissionChannel.


Your relay (smtp) should take care of that, not your client.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜