.NET Components for Mobility

Save a SMS to the Sent folder

Last post 10-06-2008 3:41 AM by PeterFoot. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-03-2008 2:10 PM

    Save a SMS to the Sent folder

    Hello,

    my application sends SMS over a web gateway so I want to save a copy of this message to the user's Sent folder in Messaging application. The code is following:

     

    OutlookSession
    ou = new OutlookSession();

    SmsMessage sms = new SmsMessage();

    sms.To.Add(new Recipient("123456"));

    sms.Update();

    sms.Body = "Text of the message";

    sms.Read = true;

    sms.MoveTo(ou.SmsAccount.SentItems);

    sms.Update();

    Application.DoEvents();

    ou.Dispose();

     

    In the messages list view, recepient and time is displayed but "[no subject]" is instead of the body text. In the message view, only "To: 123456" is displayed, no body, no time. Same experience on Windows Mobile 5 for Smartphone (PC emulator) and real Windows Mobile 6.0 Professioal.

    Am I doing something wrong?

  • 10-06-2008 3:41 AM In reply to

    Re: Save a SMS to the Sent folder

    You should call Update() immediately prior to calling MoveTo to ensure that the Body and the Read status are saved. Since the date used in the list views is the sent date this won't normally be filled in because the message has not been sent. You can set this manually using Properties[MessageProperty.MessageDeliveryTime]

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
Page 1 of 1 (2 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.