views:

268

answers:

1

I'm using the CDO.Message class to create and send an email from a Visual FoxPro application. I've tested that it works while the user is connected to the internet, and it even seems to work when I send while disconnected from the network, it simply gets sent when the client gets reconnected. One issue I have with the .Send() method of the CDO.Message class is that it does not return any success/fail value (although the object will throw an exception if it cannot send). The email message never appears to be waiting in the user's Outlook "Outbox" or anything obvious like that, but yet it seems to be waiting somewhere for a web connection at which time it sends.

The question I have is: Where does the CDO.Message email I've called .Send() on go while the application is offline? And does it have an eventual timeout/fail condition?

I'm trying to avoid "programming by coincidence" any clues on how CDO.Message works would be helpful.

+1  A: 

Unless you explicitly specify otherwise, you are using an SMTP server on the local machine. If so, the application will drop the message in the local SMTP server's outbound queue, and your application's call to Send() will always be successful (if your SMTP server is running and your message is properly formatted). You can set the Outbound Expiration timeout property in the SMTP service to specify how old messages can be before they are dropped from the outbound queue.

LSoft has a nice guide for configuring the SMTP service in IIS 6 for use with their LISTSERV package.

Scott Fletcher
Hey an answer! Thank you, Scott. Accepted.
Kit Roed