views:

480

answers:

2

How can i write code for send SMS with delivery message in Windows Mobile? please guide me with C# or C++ code. I want to use SmsSendMessage API in this code because this API have more features.

+2  A: 

You could use SmsSendMessage to send the message and use SmsGetMessageStatus to get the status report of the sent SMS. This is all C++ code, but you can pinvoke it as well.

tomlog
Which parameters must be used in calling SmsSendMessage API for delivery?
mSafdel
In the pbProviderSpecificData parameter you can set the Notification_Provider_Specific_Data struct: http://msdn.microsoft.com/en-us/library/aa919471.aspx
tomlog
+3  A: 

Microsoft.WindowsMobile.PocketOutlook Namespace

The Microsoft.WindowsMobile.PocketOutlook namespace provides classes that allow you to create and access PIM data items (Appointments, Tasks, and Contacts), and MAPI messaging items (e-mail and SMS messages), on mobile devices

SmsMessage Class in msdn

This sample shows how to send an SMS message to a mobile phone.

public void SmsMessageSend()
{
    SmsMessage smsMessage = new SmsMessage();

    //Set the message body and recipient.
    smsMessage.Body = "Would you like to meet for lunch?";
    smsMessage.To.Add(new Recipient("John Doe", "2065550199"));
    smsMessage.RequestDeliveryReport = true;

    //Send the SMS message.
    smsMessage.Send();

    return;
    }
almog.ori