You must Sign In to post a response.
  • Category: Visual Studio

    How To Send SMS in c# application


    Are you looking for a way to Send SMS in c# application ? then read this thread to know how to do it



    I need to send sms via c# windows application. it is possible ? if possible how to send sms in c# windows application.
  • #746456
    Hi,
    There are many ways you can send SMS. By registering with SMS service provider o by registering with third party service provider like way2sms etc. please refer below articles for bot the samples,

    smsco.it/tomcat/en/sms_tutorials/sms_from_c_sharp.jsp
    clickatell.com/apis-scripts/scripts/c-scripts/
    way2sms.codeplex.com/


    Regards,
    Asheej T K

  • #746457
    Hai Manoj,
    Sending the SMS can be done by using the API.
    There are few API which are paid and few are free but they have limitations of sending the SMS.
    Below are the links of few API in which few are free and few are Paid.
    So you can go through them, register to their website and then use the code:

    http://www.ozekisms.com/mms:xml/mms-settings/video/GoIPsetup/index.php?owpn=315&info=developers-guide/c-sharp-sms-api
    https://www.clickatell.com/apis-scripts/scripts/c-scripts/
    http://msdn.microsoft.com/en-us/library/aa919102.aspx
    http://www.2sms.com/software.aspx?section=CodeCSharp
    http://www.vianett.com/en/developers/api-code-examples/c

    Hope it will be helpful to you.

    Regards,
    Pawan Awasthi(DNS MVM)
    +91 8123489140 (whatsApp), +60 14365 1476(Malaysia)
    pawansoftit@gmail.com

  • #746460
    Here is a smaple code which might give you an idea for implementation



    private void Send_Click(
    object sender, System.EventArgs e)
    {
    try
    {
    SmsTest.net.webservicex.www.SendSMS smsIndia=
    new SmsTest.net.webservicex.www.SendSMS();
    SmsTest.com.webservicex.www.SendSMSWorld smsWorld =
    new SmsTest.com.webservicex.www.SendSMSWorld();
    if(rdoType.SelectedValue == "1")
    smsIndia.SendSMSToIndia(txtMobileNo.Text.Trim(),
    txtEmailId.Text.Trim(), txtMessage.Text);
    else
    smsWorld.sendSMS(txtEmailId.Text.Trim(),
    txtCountryCode.Text.Trim(), txtMobileNo.Text.Trim(),
    txtMessage.Text);
    lblMessage.Visible = true;
    lblMessage.Text="Message Send Succesfully";
    }
    catch(Exception ex)
    {
    lblMessage.Visible = true;
    lblMessage.Text="Error in Sending message"+ex.ToString();
    }
    }

    private void rdoType_SelectedIndexChanged(
    object sender, System.EventArgs e)
    {
    if(rdoType.SelectedValue =="1")
    txtCountryCode.Enabled = false;
    else
    txtCountryCode.Enabled = false;

    }

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #746466
    Sending sms need a sms gateway preferably a free gateway which will allow us to send text messages.
    There are some sms gateway provider like way2sms which support us with a free sms services.
    see below link in which with the help if 'SMSClientLibrary.dll' library we can send sms
    http://myashkap.wordpress.com/2011/03/26/sending-sms-via-c-using-way2sms/
    http://www.nullskull.com/q/10041741/sending-sms-through-net-c-windows-application.aspx
    http://www.codeproject.com/Questions/268339/SMS-Sending-using-Csharp-Winforms

    Thanks
    Koolprasd2003
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

  • #746470
    HI!

    I can also recommend you the Ozeki's C# api. We're using their software without any problem since years.
    I found a video guide for you: https://www.youtube.com/watch?v=HNnv_OkUkMI

    I hope this is helpful!


  • Sign In to post your comments