Adding a Send Command to an Application
Being able to add a Send command to a document-based application's File menu is a Microsoft Windows 95 logo requirement. The same logic applies to sending a message from any application.
Design Tasks
-
Decide whether to use Simple MAPI, CMC, MAPI, or the Active Messaging Library. See Selecting a Client Interface.
-
Decide when to load and unload the selected interface, and when to create and destroy its session. You should share the messaging client's session, if it is active. See MAPI Sessions.
Implementation Tasks
-
Determine whether the Send command should be enabled. Installation of messaging support in the operating system is optional, and your Send command should be disabled if the selected interface is not available. See Determining Which Client Interfaces are Installed.
-
Load the selected interface DLL and the entry points you will need. See one of the following topics, depending upon which interface you have selected:
-
Send a document using the selected interface. See one of the following topics, depending upon which interface you have selected:
-
Open the default message store. See Opening a Message Store.
-
Open the Outbox. See Opening a Folder.
-
Add recipients to the message's recipient table. See Recipients.
-
Add the document to the message as an attachment. See Attachments.
-
Optionally, add text to the message. See PR_BODY.
-
Send the message. See Sending Messages with MAPI.
-
Release all the objects created in the preceding steps.
About Sample Source Code
See the following topics:
Sample CMC Client
Sample Routing Client
Sample RTF Utility
Sample Simple MAPI Client
Sample Timecard Application