Message Reception Model
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
The transport provider controls whether the MAPI spooler must poll it for incoming mail or whether it performs a call back 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 provider 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:
Available messages are indicated by either the transport provider calling IMAPISupport::SpoolerNotify or by the MAPI spooler calling IXPLogon::Poll.
The MAPI spooler calls IXPLogon::StartMessage to initiate the process.
The transport provider places a reference value in the location referenced in StartMessage. These reference values allow the transport provider and the MAPI spooler to keep track of which message is being processed when there are multiple messages to deliver.
The transport provider stores the message data into the passed IMessage : IMAPIProp instance.
The transport provider calls the IMAPIProp::SaveChanges method on the IMessage instance and returns from StartMessage.
The MAPI spooler calls IXPLogon::TransportNotify if it must stop message delivery.
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. |