了解 Microsoft 的 CDO.Message 离线行为
我正在使用 CDO.Message 类来创建和发送来自 Visual FoxPro 应用程序的电子邮件。 我已经测试过它在用户连接到互联网时可以工作,并且当我在与网络断开连接时发送时它似乎也可以工作,它只是在客户端重新连接时发送。 CDO.Message 类的 .Send()
方法存在的一个问题是它不返回任何成功/失败值(尽管对象如果无法发送则会抛出异常)。 电子邮件消息似乎从未在用户的 Outlook“发件箱”或任何类似的明显内容中等待,但它似乎在某处等待 Web 连接,然后发送。
我的问题是:应用程序离线时我调用 .Send()
的 CDO.Message 电子邮件在哪里?它是否有最终超时/失败条件?
我试图避免“巧合编程”任何线索CDO.Message 的工作原理会有所帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非您明确指定,否则您将使用本地计算机上的 SMTP 服务器。 如果是这样,应用程序会将邮件放入本地 SMTP 服务器的出站队列中,并且应用程序对 Send() 的调用将始终成功(如果您的 SMTP 服务器正在运行并且邮件格式正确)。 您可以在 SMTP 服务中设置出站过期超时属性,以指定邮件从出站队列中删除之前的时间。
LSoft 有一个很好的指南,用于在 IIS 6 中配置 SMTP 服务与他们的 LISTSERV 包一起使用。
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.