Sending Messages by Using a Transport Provider
Sending Messages by Using a Transport Provider |
Before you can send messages by using a transport provider, you must initialize the transport provider to establish a connection between MAPI and the transport provider. You must also set up the transport provider so that MAPI knows what types of addresses the transport provider accepts. For more information, see Initializing a Transport Provider and Setting Up a Transport Provider.
Once the transport provider is ready to transmit messages, you must implement the IXPLogon::SubmitMessage function to send messages. This function notifies MAPI when messages are waiting to be sent, verifies the recipient addresses, and sends the message to the recipient's file share.
In this topic, the IXPLogon::SubmitMessage function is demonstrated by using a code example from the MRXP Sample Transport Provider. The MRXP Sample Transport Provider implements a shared network file system transport provider using a UNC share or a local folder. For more information about downloading and installing the MRXP Sample Transport Provider, see Installing the Sample Transport Provider.
While you are sending messages by using the transport provider, you can also receive messages by using the transport provider. For more information, see Receiving Messages by Using a Transport Provider.
If you stop using the transport provider, you must follow the proper procedures for shutting down and logging off the transport provider. For more information, see Shutting Down a Transport Provider.
Submit Message Routine
MAPI calls the IXPLogon::SubmitMessage function to indicate that is has a message for the transport provider to deliver. The function calls GetRecipientsToProcess to validate that all the recipients are in the MRXP format. The message is sent by calling the SaveToMSG method that saves the message to the recipient's file share.
CXPLogon::SubmitMessage() Example
|
See Also
About the Sample Transport Provider
Installing the Sample Transport Provider
Initializing a Transport Provider
Setting Up a Transport Provider