Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
i would like to send sms from my application to sms subscribed uers for the specific time intervals.

Is it possible using Asp.net web application or Can i use windows service?
Posted
Comments
P.Salini 26-Sep-11 5:09am    
To send sms You need to have a gateway api
and you need to follow their api

Yes you Can Do it with the help Of SMS GetWay.
 
Share this answer
 
v2
Comments
RaviRanjanKr 27-Sep-11 15:37pm    
Its not a good practice of using short word like 'u' instead of "you". I've edited your answer and suggesting you to get remember for next time.
Yes you need a gateway

Refer this link
http://www.ozekisms.com/index.php?owpn=230[^]
 
Share this answer
 
public void SendMessage()

    {

        try

        {

            string Msg = "your messgae";

            Msg = Msg.Substring(1, 160);

// this is your sms gateway api url
            string Url = "http://www.bulksms.ambikacomputers.com/messageapi.asp?username="your userid";password="your password'&sender="your sender id";mobile=" + txt_mobile.Text.Trim() + "&message=" + Msg;

          

            System.Net.HttpWebRequest myReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(Url);

 

            //Get response from Ozeki NG SMS Gateway Server and read the answer

            System.Net.HttpWebResponse myResp = (System.Net.HttpWebResponse)myReq.GetResponse();

            System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GetResponseStream());

            string responseString = respStreamReader.ReadToEnd();

            respStreamReader.Close();

            myResp.Close();

 

            //inform the user

 

        }

        catch (Exception ex)

        {

            throw ex;

            //if sending request or getting response is not successful, Ozeki NG - SMS Gateway Server may not be running

 

        }

 

    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900