Your CEMAPI-developed application does not read any content in the PR_BODY property of a Short Message Service (SMS) message in Windows Mobile (325640)



The information in this article applies to:

  • Pocket PC 2002 Phone Edition
  • Microsoft SmartPhone 2002 SDK
  • Microsoft Windows Mobile 2003 software for Pocket PC
  • Microsoft Windows Mobile 2003 software for Smartphone
  • Microsoft Smartphone 2003 SDK
  • Microsoft Windows Mobile 2003 Second Edition software for Pocket PC
  • Microsoft Windows Mobile 2003 Second Edition software for Smartphone

This article was previously published under Q325640

SYMPTOMS

In Microsoft Windows Mobile, you may develop an application by using the CE Messaging API (CEMAPI) and then you read the contents of a Short Message Service (SMS)-originated message. If your application reads the PR_BODY property of the Messaging API (MAPI) message, the property will contain an empty string or will not return an IStream interface.

CAUSE

This behavior occurs because the complete contents of SMS messages in Pocket PC Phone Edition and Microsoft Smartphone are stored in the PR_SUBJECT property of the MAPI message.

WORKAROUND

To work around this behavior, retrieve the PR_SUBJECT property of the MAPI message when you read the contents of an SMS-originated message.

STATUS

This behavior is by design.

MORE INFORMATION

SMS messages from most non-Microsoft devices have one chunk of text for the subject and the body. Because CEMAPI APIs have distinct subject and body properties, the transport stores the complete SMS message body in the PR_SUBJECT property and stores no text in the PR_BODY property. The first piece of text (the subject) is separated from the rest of the text (the body) by a newline character. A newline character is "\n".

When the Inbox application reads an SMS-originated message, it uses the newline character to put the first piece of the PR_SUBJECT property contents in the subject field and put any text after the newline character of the PR_SUBJECT property contents in the message body field.

When the Inbox application sends a message through the SMS transport, it follows these steps before it submits the message for delivery:
  1. Concatenates the contents of the subject field and the message body field.
  2. Separates the subject and body text in the data stream with a newline character.
  3. Stores the text in the PR_SUBJECT property of the MAPI message

Modification Type:MinorLast Reviewed:3/10/2006
Keywords:kbfix kbbug KB325640 kbAudDeveloper