Messaging Application Development for Windows Mobile-based Devices
MAPI is a COM-based library that provides programmatic access to Microsoft's messaging client application, Messaging (formerly named Inbox), to message stores and the message items they contain.
You can also use MAPI to create an entirely new messaging client application, create a new messaging transport, create custom forms for the Messaging application, implement a mail-rule client to programatically process incoming messages, implement an advise-sink object for handling notifications, and programmatically manage high-level operations on container objects like address books, distribution lists, and folders.
Note Prior to the release of Pocket PC and Smartphone 2002 software, programmatic access to the messaging system was provided through the Windows CE MsgStore APIs (found in msgstore.h and msgstore.lib). Although later versions of Windows Mobile provide limited backward compatibility, it is recommended that you modify your code to use MAPI instead.
In this Section
For background information on the messaging subsystem, and on extending the Messaging application, see the following topics in this section:
- Alternative SMTP Server
When you access your own ISP e-mail through a different network, for example through a mobile operator, the ISP may refuse to allow sending mail by using SMTP. It is fairly common to prevent spam abuse by allowing only clients that are authenticated on the ISP network to send mail. To resolve this problem, you can set up your own SMTP server for your users. - APPLICATION Configuration Service Provider Classes
OMA considers each transport to be an application, and requires a corresponding APPLICATION Configuration Service Provider. The following classes are used to implement these Configuration Service Providers: Application class, AppAuth class, AppAddr class, and the AppPort class - Customized Messaging Rules Clients
A customized messaging rules client is a message processor that works in conjunction with the Messaging application (or any other messaging client application). When a message arrives at a particular message store, the messaging rules client checks to see whether it meets a set of criteria (defined by the messaging rules client). If it does, the client moves the message to a destination folder, modifies it, or deletes it. For example, a messaging rules client can delete incoming messages that are sent from a list of blocked senders. - How to Create a Messaging Application
Contains topics that present procedures with code examples that show you exactly how to use MAPI to create a messaging application. - Hyperlinking in Messages
Describes how hyperlinks work in e-mail and text messages. - Message Stores
A message store serves as a local archive for storing messages on Windows Mobile-based devices. One message store is present for each messaging account, and each messaging account is associated with one message transport. For example, you might use a Pocket PC to service three POP3 e-mail accounts. In this scenario, you might have four message stores: one for Outlook e-mail transferred through ActiveSync, two for Outlook e-mail transferred via POP3, and one for text messages transferred via Short Message Service (SMS). - Messaging Extensibility Settings
The default Messaging wizard that is used for traditional e-mail settings cannot be used for custom account settings. Custom account settings are different than traditional e-mail settings. Messaging uses the IMailSyncHandler::DoProperties method to enable you to show your own UI for the settings wizard. To notify Messaging to show your custom UI for custom transports, you must use the PropDialog capability. The IMailSyncHandler interface is implemented by the transport to enable communication with Messaging. - Messaging Forms
You can change the behavior of the Messaging application (or any other messaging client application) by creating customized messaging forms. They are customized read and compose forms and can be used with new and existing transports. The behavior that they provide can vary, from adding new transport types such as Multimedia Messaging Service (MMS) to adding a new message type, such as one that supports playing a game like ticktacktoe. - Messaging Sample Code
The Windows Mobile Version 5.0 Pocket PC and Smartphone SDKs ship with a set of code samples that demonstrate how to use MAPI. The default install location for themis C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\Samples\CPP\Win32\
. - Messaging Transports
A message transport is a networking protocol that facilitates the transfer of messages between a messaging client application and a messaging host server. - New Messaging APIs for Windows Mobile Version 5.0
The messaging APIs support these new features: start up the Messaging Application (Inbox) and switch accounts, syncronize an account, create a new message form, and open an existing message. - POP3 and SMTP Transport Method
You can prevent errors that can sometimes occur when POP3 and SMTP authorization occur simultaneously, by changing the transport method associated with all POP3 and SMTP accounts created using the Messaging Application (Inbox) Account Wizard. - Transport Account Names
Explains the default messaging account names used in the various versions of Windows Mobile. - Windows Mobile-based Device Service Management with SI and SL
The user can use the mobile Internet browser to download the provisioning file that contains an update. The user can be notified that a download is available through Short Message Service (SMS), an e-mail message, or a Service Indication (SI). The user can then browse to a Web site to retrieve available downloads.
See Also
Messaging | Pocket Outlook Object Model | How to: Begin a MAPI Session | How to: End a MAPI Session | How to: Connect to a Message Store | How to: Create a Message | How to: Send a Message | How to: Register Customized Messaging Forms | How to: Register Customized Messaging Rules Clients | How to: Register Customized Messaging Transports | Messaging Sample Code
Send Feedback on this topic to the authors