CDO 的消息大小限制?

发布于 2024-11-28 05:24:46 字数 701 浏览 1 评论 0原文

我有一个应用程序,我正在其中创建一封电子邮件,我希望同一个盒子上的 SMTP 服务器(IIS)发送该电子邮件(操作系统是 2003 Server 32 位)。我使用“cdSendUsingPickup”方法发送此信息。

使用 IMessage 界面,我将消息复制到服务器的拾取目录中。只要我的消息低于 ~150MB,一切都很好。大小由邮件附件决定。但如果我包含的附件​​超过此限制,IMessage::GetStream() 将失败并显示 0x8007000e - 没有足够的存储空间来完成此操作。服务器有充足的高清空间。我遇到了某种空间限制,我认为这更多是内存限制,而不是高清空间问题,但我没有找到任何关于发生了什么的线索。下面的伪代码 - 对 GetStream 的调用失败,消息大于 150MB 左右。对于较小的消息效果很好。

DlvrMsg(IMessage piMsg)
{
     _StreamPtr pStream = NULL;
     HRESULT hr = piMsg->GetStream(&pStream);
     pStream->put_type(adTypeBinary);

    //.. then use pStream->Read() to read the bytes of the message
    // and copy to an .eml file in the pickup directory.

    ...

  }

I have an application in which I'm creating an email which I want the SMTP server (IIS) on the same box to deliver (OS is 2003 Server 32 bit). I send this using the "cdSendUsingPickup" method.

Using my IMessage interface, I copy the message to the servers pickup directory. All works great as long as my message is below ~150MB. The size is accounted for by attachments to the mail. But if I include attachments over this limit, IMessage::GetStream() fails with 0x8007000e - not enough storage space is available to complete this operation. The server has plenty of HD space. I'm running into a some kind of space limitation and I'm thinking it's more a memory limitation, not a HD space issue but I'm finding no clues as to what's going on. Pseudo code below - the call to GetStream fails with a message bigger than 150MB or so. Works fine with smaller messages.

DlvrMsg(IMessage piMsg)
{
     _StreamPtr pStream = NULL;
     HRESULT hr = piMsg->GetStream(&pStream);
     pStream->put_type(adTypeBinary);

    //.. then use pStream->Read() to read the bytes of the message
    // and copy to an .eml file in the pickup directory.

    ...

  }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

国粹 2024-12-05 05:24:46

是的,显然是有一个限制,尽管微软不会给出这个限制的硬性规定。他们只是说在调用 realloc 时对 GetStream() 的调用失败。越来越多的内存被重新分配,直到达到某种人为的限制。

这种情况发生在 2003 年服务器以及 2008 年 32 位和 64 位服务器中。唯一的解决方法是使用 CDO 以外的其他方式来发送邮件。

Yes apparently there is a limit, though MS won't give hard and fast rules for what that limit is. They only say the call to GetStream() fails in a call to realloc. More and more memory is reallocated until it hits some artificial limit.

This occurs in 2003 server as well as 2008 both 32 and 64 bit. Only work arounds are to use something other than CDO to send your mail.

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