Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

PRB: Calling FlushQueues() Does Not Deliver Messages


View products that this article applies to.

This article was previously published under Q188297

↑ Back to the top


Symptoms

Frequently, developers want to have their application work with an offline store and at a later time send and receive mail by calling IMAPIStatus::FlushQueues(). Sometimes, FlushQueues() will return success but no messages are sent or received. The outgoing mail is still located in the Outbox.

↑ Back to the top


Cause

This problem is the result of a limitation of the Extended Messaging Application Programming Interface (MAPI) spooler. The spooler only checks for outgoing mail in currently loaded (open) message stores. So, if you do not currently have a reference to the store via IMAPISession::OpenMsgStore(), for example, the messages in that store will not be flushed.

↑ Back to the top


Resolution

In order to ensure that messages in a particular message store are flushed, call IMAPISession::OpenMsgStore() on that store, call IMAPIStatus::FlushQueues(), and then release your store pointer.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


Keywords: KB188297, kbprb, kbmsg, kbapi

↑ Back to the top

Article Info
Article ID : 188297
Revision : 6
Created on : 8/18/2005
Published on : 8/18/2005
Exists online : False
Views : 508