C# – Send SMS AND copy them into the “sent messages” folder

ccompact-frameworknetsmswindows-mobile

I'm developing an application for windows mobile 6.5. Im writing the code in c#.net and want to send sms due to my app.
I checked out the POOM and sms sending worked fine.

Code:

SmsMessage msg = new SmsMessage();

        msg.To.Add(receiver);
        msg.Body = messageText;
        msg.Send();

But there's one problem. I want that the messages will be saved/copied to the "send messages" folder, after my program has sent them.
How can I realize that. Is it possible with the POOM, oder should I work with MAPI and generate a converted copy of the msg-Object in the "send messages"-folder?

greets,
raffi

Best Answer

Try sending the message using the SMS account:

OutlookSession session = new OutlookSession();
SmsAccount sa = session.SmsAccount;

SmsMessage msg = new SmsMessage();
msg.To.Add(receiver);
msg.Body = messageText;

sa.Send(msg);