Monday, January 6, 2014

How to send SMS through code in ax 2012

public static void sendsms(Args _args)
{
System.Net.WebClient custWebclient;
System.IO.Stream InfoData;
System.IO.StreamReader Streamreader;
System.String URLStr;
Str SMSConfirmID;
str mobileno='983499999';
str message='Test SMS';
;
custWebclient=new System.Net.WebClient();
URLStr="http://www.smszone.in/sendsms.asp?
page=SendSmsBulk&username=87676767645&password=8787&number="+mobileno+"&message="+message;

//URLStr="http://site5.way2sms.com/content/index.html/Login1.action?//username=9910999999&password=26&phone="+mobileno+"&msg="+message;

//URLStr="http://site5.way2sms.com/content/index.html/Login1.action?username=9910999999&password=26&number="+mobileno+"&message="+mess

//URLStr="http://site5.way2sms.com/content/index.html/Login1.action?username=9910999999&password=26&phone=9910711493&msg=hggfjhfhggf";

//URLStr="http://site5.way2sms.com/content/index.html/Login1.action?username=9910999999&password=26&number=9910711493&message=hggfjhfhggf";

InfoData=custWebclient.OpenRead(URLStr);
Streamreader=new System.IO.StreamReader(InfoData);
SMSConfirmID=Streamreader.ReadToEnd();
InfoData.Close();
Streamreader.Close();
}

No comments:

Post a Comment