Sending SMS

Hello Everybody

Can any body help me in writing VB.Net code for sending SMS over GSM through .Net compact frame work

Thanks




Answer this question

Sending SMS

  • mareke

    Hi

    I am using a web service which already exists. i used folllowing web service to send SMS

     http://www.webservicex.com/sendsmsworld.asmx WSDL

     With the help of this web service I send SMS to various countries like India, US, UK, Malaysia, Japan etc. 

    The Following Code Help you to send SMS uasing web service

    private void Send_Click( object sender, System.EventArgs e)
        {
          try
          {
            SmsTest.net.webservicex.www.SendSMS MessageSMS=
              new SmsTest.net.webservicex.www.SendSMS();


              MessageSMS.sendSMS(txtBoxEmailId.Text.Trim(),
               txtBoxCountryCode.Text.Trim(), txtBoxMobileNo.Text.Trim(), 
               txtBoxMessage.Text);

                 lblBoxMessage.Text="Message Send Succesfully";
          }
          catch(Exception ex)
          {
             lblBoxMessage.Text="Error in Sending message"+ex.ToString();
          }
        }

     

    First you need to referenced to the web service in your application

       



  • rany aof

    Hi,

    You can use SMSMessage class which is available in Microsoft.WindowsMobile.PocketOutlook.Dll . Also add Microsoft.WindowsMobile.Dll to the references.

    Here is a code sample for this. I had written a code sample for sending sms in C#.

    if (args.Length > 2)

    {

    string msg = "";

    for (int i = 1; i < args.Length; i++)

    {

    msg += argsIdea;

    msg += " ";

    }

    msg = msg.Substring(0, msg.Length - 1);

    SmsMessage message = new SmsMessage(args[0], msg);

    message.Send();

    }

    This code is working for me



  • Mike_Pike

    you need an sms gateway to use to send sms text messages. These can be purchased from some company on the internet.

    The company usually has a web service which you use to send the text message to including the recipient number and text message.



  • xDev

    Wouldn't just creating a SMS-message and sending it through the phone's own mechanisms do the trick

    Here's the C# code for .NET Compact Framework 2.0:

    using Microsoft.WindowsMobile.PocketOutlook;
    ...
    SmsMessage s = new SmsMessage("0001234567", "Hello fellow!");
    s.Send();

    and here's with VB.NET:

    Dim s As New Microsoft.WindowsMobile.PocketOutlook.SmsMessage("0001234567", "Hello Fellow!")
    s.Send()

  • tuzojazz

    Hai Shibu Bhattarai,

    I tried with the same webservice but it is displaying the result like "Message sent successfully" but I am not receiving any sms to any of the mobile phones. Can you please guide me to solve my problem....Even if it is possible can you please give me the advice on any other other webservice..where i can buy the webservice..

    Thank u in advance...


  • Cyberpass

    Please take a look at 'Sms' class on OpenNetcf.org in new SDF 2.0.

  • cgi_70

    Hi,

    You can check the link http://msdn2.microsoft.com/en-us/library/ms838145.aspx and get details as to how we can use sms.dll which is inbuilt in windows CE and send sms. we need to make a wrapper class for this dll and use it.

    thanks, amit



  • Moed

    Hello Everybody

    Can any body help me in writing VB.Net code for sending SMS over GSM through .Net compact frame work

    Thanks



  • Sending SMS