How to Send message to mobile no using c#

c# Code:

string ContactNo = "8343094272"; // to mobile no
                string MessageText = "Welcome to Softtechsolving"; // your message
                string strUrl = string.Format("http://api.mVaayoo.com/mvaayooapi/MessageCompose?user=softtechsolving@gmail.com:soft@123&senderID=TEST SMS&receipientno={0}&msgtxt={1}&state=4", ContactNo, MessageText);
                WebRequest request = HttpWebRequest.Create(strUrl);
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                Stream s = (Stream)response.GetResponseStream();
                StreamReader readStream = new StreamReader(s);
                string dataString = readStream.ReadToEnd();
                response.Close();
                s.Close();
                readStream.Close();


Namespace:
add this namespace to namespace area...
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
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;
using System.Xml.Linq;
using System.Net;
using System.IO;
using System.Data.SqlClient;


Popular posts from this blog

How to protect your Drive/Flash USB Drive (Pen Drive) with Password without using any software