The developers can make use of the SMSComposeTask launcher to send the SMS in Windows Phone 7 .
To send the SMS in Windows Phone 7 using SMSComposeTask by including the namespace Microsoft.Phone.Tasks
using Microsoft.Phone.Tasks;
The Microsoft.Phone.Tasks namespace includes the classes necessary for all the Launcher and Chooser tasks .
Now , create the instance of the SMSComposerTask and set its “To” field to a valid number and the “Body” property to a text to be sent .
private void button1_Click(object sender, RoutedEventArgs e)
{
SmsComposeTask composeSMS = new SmsComposeTask();
composeSMS.Body = " This is a Test SMS sent using SmsComposeTask launcher";
composeSMS.To = "1765432548";
composeSMS.Show();
}
The Show method will display the SMSComposer screen which requires the user interaction to send the SMS .

Currently , the Windows Phone 7 does not supports directly sending the sms without the SMS Compose Screen .We may have to wait and watch to see if it will be available later .


8 comments
Tushar
I want to send the SMS programatically, as I do it in Android. Lets see how long do we have to wait for this.
May 25, 2011
SifriG
Thank You!!
its works!
Aug 1, 2011
Le@rner
hi all,
i want to send sms from windows phone 7?
i am check the SmsComposeTask for this but its just show the message compose window with assigned value of number and msg body.
i want to send the sms directly from app without the user initiating.
i read this may be possible by Push Notification so please help me for this.
thanks in advance.
Aug 1, 2011
How to send SMS in Windows Phone 7 using C#
[...] via How to send SMS in Windows Phone 7 using C. [...]
Aug 1, 2011
Peter
Sending SMS without user interaction is not allowed.
Vicious people could then write an app that sends charging SMS’s in the background without the user knowing about it.
Sep 23, 2011
jonathan ditya
hello, i try to send an sms in windows phone emulator, but it doesnt working…
can you help me??
Jan 14, 2012
Senthil Kumar
In emulator , you can only go upto the compose SMS , then when you click send , you will not be able to do because it does not have cellular connection . try this on the Windows Device it will work …
Jan 14, 2012
jonathan ditya
thanks for you answer Mr. senthil kumar..
i have been connected my laptop to GSM modem, have write a code for connected port and database.. but really doesnt work… i
can you help me to solve this problem..
iam sorrr, im newbie… thanks before…
Jan 18, 2012