Microsoft KB Archive/325640

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

Article ID: 325640

Article Last Modified on 3/10/2006

-

APPLIES TO


 * Microsoft Pocket PC 2002 Phone Edition Software
 * Microsoft SmartPhone 2002 SDK
 * Microsoft Windows Mobile 2003 software for Pocket PC Standard Edition
 * Microsoft Windows Mobile 2003 software for Smartphone
 * Microsoft Software Development Kit for Windows Mobile 2003-based Smartphones
 * Microsoft Windows Mobile 2003 software for Pocket PC Standard Edition
 * 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 &quot;\n&quot;.

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

Keywords: kbbug kbfix KB325640

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.