Click here to Skip to main content
15,890,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I develope a Application for School / College. I integrate a module SMS.

How I send SMS via internet through Bulk SMS Account to Cell Phone and save Bulk Account Confugration ?

please help........


thanks in advance
Posted
Updated 4-May-11 20:45pm
v2
Comments
Ankit Rajput 5-May-11 1:11am    
Have you taken the services from any Site for SMS sending?
Kim Togo 5-May-11 2:16am    
What SMS service are you using?

1 solution

First YOu Need Bulk SMS Accound
2) Activate the Sender ID and Add Credits into your account
3) Get the Details of HTTP API from your SMS API provider.
4)Provide the UserName and Password of YOur API Account.


Here is My code for sending SMS from My SMS API CLASS
using System.Net;
using System.Text;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
namespace YOurProject.Classes
{
    class SENDSMS
    {
        private WebProxy objProxy1 = null;
        public string SendSMS(string User, string password, string Mobile_Number, string Message)//send parameters as UserName Password mobileNUmb and Message from your application
        {
            string stringpost = null;
            stringpost = "User=" + User + "&passwd=" + password + "&mobilenumber=" + Mobile_Number + "&message=" + Message;
            HttpWebRequest objWebRequest = null;
            HttpWebResponse objWebResponse = null;
            StreamWriter objStreamWriter = null;
            StreamReader objStreamReader = null;
            try
            {
                string stringResult = null;
                objWebRequest = (HttpWebRequest)WebRequest.Create("http://sms.equilux.co.in/WebserviceSMS.aspx");//this is your SMS API provider's URL
                objWebRequest.Method = "POST";
                if ((objProxy1 != null))
                {
                    objWebRequest.Proxy = objProxy1;
                }
                 objWebRequest.ContentType = "application/x-www-form-urlencoded";
                objStreamWriter = new StreamWriter(objWebRequest.GetRequestStream());
                objStreamWriter.Write(stringpost);
                objStreamWriter.Flush();
                objStreamWriter.Close();
                objWebResponse = (HttpWebResponse)objWebRequest.GetResponse();
                objStreamReader = new StreamReader(objWebResponse.GetResponseStream());
                stringResult = objStreamReader.ReadToEnd();
                objStreamReader.Close();
                return stringResult;
            }
            catch (Exception ex)
            {
                return ex.Message;
            }
            finally
            {
                if ((objStreamWriter != null))
                {
                    objStreamWriter.Close();
                }
                if ((objStreamReader != null))
                {
                    objStreamReader.Close();
                }
                objWebRequest = null;
                objWebResponse = null;
                objProxy1 = null;
            }
        }
 }
}
 
Share this answer
 
v3

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