Friday, January 29, 2010

Code for sending sms from C# using way2sms api

Before Write a code use the steps given below

1. Add Web References to your page.
In that web references page just type this "http://www.spiritssoft.com/webservice/sendway2sms.asmx" in url optoin and click go

After Added that

2. use the name space Using com.spiritssoft.www

3. create a object for sending a sms
SendWay2Sms Objsms_send = new SendWay2Sms();

4.write the code given below here

Note: If you send to a single number just write the code what given here.If you want to send more than one person use comma(,) to seperate the numbers.


For sending one number:

String Strsms_result=Objsms_send.sendSmsSpiritsSoft("UserName", "Password", "Number", "message");

For sending more than numbers:

String Strsms_result=Objsms_send.sendSmsSpiritsSoft("UserName", "Password", "Number 1,Number 2,Number 3", "message");

2 comments:

Unknown said...

Hi.. nice one.. can u share the webservice code as well...

Unknown said...

if possible plz send the code to my email.. mujahidazam@gmail dot com