了解 Microsoft 的 CDO.Message 离线行为

发布于 2024-07-08 20:48:08 字数 645 浏览 5 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

韵柒 2024-07-15 20:48:08

除非您明确指定,否则您将使用本地计算机上的 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文