Platform SDK: MAPI |
The transport provider controls whether the MAPI spooler must poll it for incoming mail or whether it performs a callback to the MAPI spooler when new mail arrives. The transport provider sets the SP_LOGON_POLL flag when it returns from IXPProvider::TransportLogon to request polling. Otherwise, the transport uses IMAPISupport::SpoolerNotify when incoming mail is available. After learning that incoming mail is available, the MAPI spooler opens a new message and asks the transport provider to store the received message properties into the message.
This process works as follows:
Note If a transport provider must deliver a large number of messages and the transport provider is using IMAPISupport::SpoolerNotify instead of IXPLogon::Poll, care should be taken not to call SpoolerNotify too frequently in order not to deprive other transport providers of CPU time. The MAPI spooler does have logic to prevent this from happening, but in general the interval between SpoolerNotify calls should be longer than the time it takes your transport provider to process one message.
Also, the MAPI spooler may not process an incoming message immediately. The MAPI spooler may ask the transport provider to perform other tasks before it receives the incoming message.