tags:

views:

23

answers:

2

Hi

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

A: 

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

Pierre 303
relay smtp?????
chobo2
What if the relay server is down ?
nos
I don't know what that is.
chobo2
You have always at least 4 involved computers in the process. Your client that sends the email to an smtp relay. This relay take your message and try to send it to all the specified recipients. If there is a problem such an unreachable server, it will try again for you. Once the message has been delivered by the recipients mail sever, he can download it using it's own client. So the only thing you can do, is catching the exception when trying to send the message to your smtp, not the mail server of your recipient. You can detect problem by parsing error message sent by your own mail server.
Pierre 303
Here you go http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
Pierre 303
Well I just care about the problems sent to my smtp. If it is down then I want to keep resending till it is up again.
chobo2
A: 

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.

nos