The information in this article applies to:
SUMMARY
This is a Simple MAPI console application that demonstrates how to use most
of the Simple MAPI functions available. It is written in Microsoft Visual
C++ 5.0 but any previous version of the compiler works just as well.
Smplmapi.exeThe Smplmapi.exe file contains the following files: SwapMain.cppFor more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address http://www.microsoft.com/downloads/search.aspand then click How to use the Microsoft Download Center. MORE INFORMATION
SwapMain.cpp is the main controlling program file. It is responsible for
displaying a menu to the user and interpreting the commands given by the
user. The code in this file is written specifically for a console
application, but because it makes calls into a separate module that
implements functionality using a user-defined class, a windows style
application could be easily substituted as the main controller of the
application.
Logon to Messaging SystemThe user is prompted for a profile name. If it can find the profile name in the list of profiles, it will log the user on to the messaging system. If it cannot find the profile entered by the user in the list of profiles, the user is to cancel the operation or choose from an existing list.Select a Recipient/Get E-Mail AddressThe user is prompted with an address book list. When an entry is chosen from this list, the method allocates a buffer and stuffs the buffer with the e-mail address of the recipient chosen in the list. The buffer must be released by the caller of this method.Enter E-Mail Address/Get RecipientThe user is prompted to type an e-mail address. When a valid e-mail name is entered and found in the address book, the method allocates storage for a buffer and stuffs the buffer with the display name of the e-mail alias. The buffer allocated in this method must be released by the caller.Get Details of RecipientThe user is prompted to type an e-mail address. When a valid e-mail address is entered and found in the address book, the user is presented a "details" page filled with information specific to the e-mail address entered by the user.Send Mail Message to Recipient Using Default UIThe user is prompted with the default "Compose Note" form. When the message has been given a recipient to send to and the send button is pressed, the intended recipient gets the message.Send Mail Message to Recipient with No User InterfaceThe user is prompted for the intended recipient. After a valid recipient is entered, a hard-coded message is sent to the intended recipient.Send Mail Message with an AttachmentThe user is prompted for the intended recipient. After a valid recipient is entered, the user is prompted for the file and path of a file to attach. The file name must be the 8.3 representation of the file to attach. The path name must be in the following format: "c:\windows\" (Note: the trailing backspace is mandatory). A message is then sent to the intended recipient.Create a New MessageA new message is automatically created in the Inbox of the user's default message store.List Messages in the InboxThe user is presented with a list of the messages in the user's default message store Inbox.Read Next Unread MessageThe user is presented with the contents of the next unread message in the default message store Inbox.Log Off of the Messaging SystemThe session handle is released and the user is logged off of the messaging system. No MAPI specific menu options are available until the user requests to be logged back on to the messaging system. The application remains running until the user chooses to exit the application. If the user elects to exit the application without first logging off, the session is terminated in an orderly fashion and then the application closes.Additional query words:
Keywords : kbfile kbsample kbMAPI kbMsg kbMAPI000 SMapiCMC |
Last Reviewed: January 14, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |