When accessing a message in the SMS store of a windows mobile smartphone v5.0, it throws an exception for the Recipients attribute. It's on both the sent and received folders.
The exception is:
pIMAPITableGetRowCount failed: E_NOTIMPL
The code I'm using is this:
MAPI Mapi = new MAPI();
IMAPIMsgStore SMSMessageStore;
foreach (IMAPIMsgStore store in this.Mapi.MesssageStores)
{
if (store.DisplayName.Equals("SMS", StringComparison.InvariantCultureIgnoreCase))
{
SMSMessageStore = store;
break;
}
}
if (SMSMessageStore != null)
{
Int32 MaxSentMessages = (Int32)SMSMessageStore.SentMailFolder.NumSubItems;
foreach (IMAPIMessage message in SMSMessageStore.SentMailFolder.GetNextMessages(MaxInboxMessages))
{
MessageBox.Show(String.Format("Message: From: {0} To: {1} Subject: {2}", message.Sender.FullAddress, message.Recipients[0].FullAddress, message.Subject));
}
}