tags:

views:

253

answers:

3
+2  Q: 

How to send sms

Hi,

I want to send an sms to a mobile phone through my C#, C++ code. Can any body help me. I dont want any mobile, or any external device attached to my computer. I am just having my laptop, or desktop PC and in that i want to write a C++ or C# application which can send an sms to a mobile phone.

+3  A: 

Clickatell is a popular SMS gateway, which covers 819 networks in over 220 countries.

The API offers a choice of connection options via: HTTP/S, SMPP, SMTP, FTP, XML, SOAP and COM. You can simply choose any suitable connection method that you feel confortable using in C# or C++.


To give a few examples, the HTTP method would be as simple as requesting the following URI from your application:

http://api.clickatell.com/http/sendmsg?to=NUMBER&msg=Message+Body+Here   

The SMTP method would consist in sending a plain-text email to [email protected], with a body as in the following example:

user: xxxxx
password: xxxxx
api_id: xxxxx
to: NUMBER
text: Message Body Here

The other methods are similarly easy to interface with, in my opinion. You can check out the full details from the Clickatell API Guide.

Daniel Vassallo
Thanks for you answer, but do you have a code which i can use.
Mukul Aggarwal
Yes, check out http://www.clickatell.com/developers/c.php for a C# example, or http://www.clickatell.com/developers/scripts.php for further examples.
Daniel Vassallo
A: 

There are a couple options out there. You could use a gateway like Twilio, Clickatell or the many others. These cost money but are more reliable than other methods. I wrote a C#/.NET library for Twilio that makes it super easy to use.

Alternately you could ask each user for their carrier, then send an email to their phone's email address. This is less reliable and requires you to know what carrier they use and if they change carriers, they have to remember to tell you.

John Sheehan
A: 

Thanks all for your answer ,. it really helped me to make a C++ code and to make a scheduled delievery.

Mukul
@Mukul: You may want to mark one of the answers as accepted if it was helpful, by clicking on the green tickbox next to the answer.
Daniel Vassallo