smtpmail.send() while the smtp instance is not running

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey folks

anyone know how to make smtpmail.send() just drop the message in the pickup folder? Code works fine if the smtp instance is running ( in IIS manager ) give a nasty error if smtp is stopped

"Could not access 'CDO.Message' object.Here is the full error messageSystem.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040213): The transport failed to connect to the server

--- End of inner exception stack trace --
etc, etc, etc

Basically, if the smtp service or instance is stopped for any reason, like maintenance, I don't want any impact in the application.
 
I don't think there's any other way to solve this issue but to design your
application to catch the exception, and retry later.
 
It would be easier to use the unmanaged code version of cdonts This is a web app, and i'm coding for a "forgot password" feature. Telling the user to try logging on later, or queueing the email in a custom built chunk of code is not really what I want. It would be easier to just create a text file in the pickup directory with a stream object.

C'mon Microsoft! Paying MSDN Universal subscriber here! HAS to be a way.

----- Gabriele G. Ponti wrote: -----

I don't think there's any other way to solve this issue but to design your
application to catch the exception, and retry later.
 
Back
Top