The IMAPISupport::SpoolerYield method gives control of the CPU to the the MAPI spooler so that it can perform any tasks it deems necessary.
HRESULT SpoolerYield(
ULONG ulFlags
);
The IMAPISupport::SpoolerYield method is implemented for transport provider support objects. Transport providers call SpoolerYield to allow the MAPI spooler to accomplish any necessary processing.
Call SpoolerYield when you are performing lengthy operations that can be paused. This allows foreground applications to run during a long operation, such as delivery to a large recipient list across a busy network.
If SpoolerYield returns with MAPI_W_CANCEL_MESSAGE, the MAPI spooler has determined that the message should no longer be sent. Return MAPI_E_USER_CANCEL to your calling process and exit if possible.
For more information about yielding to the MAPI spooler, see Interacting with the MAPI Spooler.