Sand SMS form any Web Site

======================================================



// This are the name spaces We Are Used
using TestWeb;
using System.IO;
using System.Net.Mail;
using System.Web.Services;
using System.Net;

// SMS Method We ar Used

private void send_SMS()
{
string smsMessage = "Dear Customer," + "\r";
smsMessage += "Welcome to Rajesh Blog" + "\r";
smsMessage += "Your-UserID:" 123 "\r";
smsMessage += "Your-Password:"123"\r";
smsMessage += "Have a Nice Day!!!!";


string MobileNo = txt_telephone.Text.Trim(); // This is a text box having Phone No.
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
WebClient client = new WebClient();

if (MobileNo != "")
{
string baseurl = "http://sms.demo.in/demosms.phpusername=DEMO&password=DEMO&sender=TEST&to=" + MobileNo + "&message=" + smsMessage + ""; // This is a link to of SMS account (API) you have to purchase this account for sand SMS
Stream data = client.OpenRead(baseurl);
StreamReader reader = new StreamReader(data);
string s = reader.ReadToEnd();
data.Close();
reader.Close();
}
}


// HOPE THIS WILL HELP YOU ,HAVE A NICE DAY - Raj
=======================================================

0 comments: