Understanding User Behavior Microsoft CDO.Message

I am using the CDO.Message class to generate and send email from a Visual FoxPro application. I've tested that it works as long as the user is connected to the internet, and even it seems to work when I send a message offline, it just gets sent when the client reconnects. One of the problems I have with the .Send()

CDO.Message class method is that it doesn't return any success / fail value (although the object will throw an exception if it can't send). An email message is never expected in the user's Outlook "Outbox" or anything like that, but it still seems like it is waiting for a web connection somewhere, and at that time it is sending.

I have a question: Where is the CDO.Message email that I was calling .Send()

on the go while the app is not offline?
And does it have a wait / failure time?

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

+1


source to share


1 answer


Unless you explicitly indicate otherwise, you are using an SMTP server on your local computer. If so, the application will discard the message on the local outgoing SMTP server queue, and your application Send () call will always succeed (if your SMTP server is running and your message is formatted correctly). You can set the outbound expiration timeout property in the SMTP service to specify how old messages can be before they are removed from the outbound queue.



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

+1


source







All Articles