views:

1563

answers:

13
+10  Q: 

Sending SMS

I want to send SMS from my Web application in C#.

Can anyone guide me as to how this can be done ?

+7  A: 

A common way is to use an email-to-sms service. Most telco providers offer that (at least here in Austria). That way, all you have to do is to generate an email to an address that corresponds to the recipients cell phone number.

ammoQ
This is how we do it.
mattruma
in germany the user has to activate that and if he does it costs money
Thomaschaaf
A: 

check out this link

C4SMS Code Snippets for that to work you have to use their service at http://www.c4sms.com/

and

http://www.ozekisms.com/c-sharp-sms-api/index_p_php_q_ow_page_number_e_315opt.html

tHeSiD
A: 

Few years ago we did the same. We found "sms provider" on the internet. Paid subscription, for certain amount of money you can send certain amount of sms messages. Then they provided us with web service we can use to send sms messages. And calling web service from C# should not be complex. Also there are some free providers but there are not guarantees they will deliver sms immediately or at all.

jan
+2  A: 

It isn't too difficult, you have to send an email to each carrier's SMS gateway, using the phone number of the phone you are trying to contact. The trick here is knowing what the gateway is for each different carrier and then knowing which carrier the receiver is using. Take a look at this link

IMO, an easier way is to use a SMS service, but of course that has a fee attached to it.

Khadaji
+1  A: 

I'm building a C# web app at work that requires sending sms - We're using IntelliSms, they provide a DLL wrapper for their web service and it's pretty cheap.

TWith2Sugars
A: 

I've used ActivExperts sms toolkit and simply hooking up a serial gsm modem to a server which could then easily be instructed to send text messages from any application basically.

It's a bit overkill but it makes sure the text message actually gets sent even if there is some network problems (like warning me that there's a network problem ;)

Oskar Duveborn
A: 

Yes, it’s possible.

Bombe
ha ha!! That was nice one!!!
Shoban
Y the down vote? Initial the question was "Answer me"... and now the question was edited.
Shoban
+3  A: 

Just to add more to the above answers. Firstly Yes you can send SMS using c#.

There are two ways.

  1. Free : Looking at your name I think you are from India if so there are many free sms services which have their own API. This page has a loads of links. The disadvantage of using free service is that they add advertisements to your messages. 1 sms can contain a max of 160 chars so longer messages will be sent as multiple messages (ads in every message). Usually they follow HTTP protocol. So you just have to create a form and submit. Another disadvtage of using a free service is its not reliable.

  2. Paid : There are providers in India who give you paid SMS service. Some of the advantages include Faster delivery, No ads, control panels, Delivery reports, no limit in number of sms etc. Google sponsored links for "Bulk SMS" search will give you the list of sms providers. Protocols include HTTP, SMPP etc.

Update: The email to SMS will not always work in India.

Shoban
+1  A: 

I am using the Clickatell SMS gateway to send SMS using C++. www.clickatell.com

Lennart
We were using clickatell's HTTP API in our C# application and it worked well until they got into a recent debacle having to do with their users spamming - now we're in the market for a new provider.
Pat
A: 

I always use GSM modems for this at work. My applications send text messages to warn Semiconductor clean room users of gas alarms and other equipment failures. Depending on the deal you get from a network provider this should work out cheaper than paying for a software service and has the advantage of working even if their is a network or power failure (since the PC and GSM modem are on a UPS).

Remember however that SMS isn't exactly foolproof and I have found that if I send 50 messages that 45 will get through in under two minutes another three will arrive within an hour , one will arrive up to 6 hours later and remaining message will never arrive ! In my case this isn't a huge problem since the text alerts are in addition to sirens and other alarms but can be annoying. I was told that the UK emergency services don't use SMS for this very reason and instead use pagers or their own Tetra network instead.

If you do go the GSM modem route don't bother with a special library. Every modem I have used only needs to be sent a special AT command via the serial port to send a SMS which can be done with a few lines of code.

IanW
A: 

You can use this web site for Turkish operators

Mükremin
A: 

I built a .NET library that uses Twilio's REST API to send SMS (or make voice calls). It requires a Twilio account however but works internationally.

(Disclaimer: I work at Twilio, but I built this library prior to starting here)

John Sheehan
A: 

Hi, I tried this one in our application.

http://www.codeproject.com/KB/cs/SMS.aspx

We just had to purchase a modem and it worked. But I am not sure in other countries. Our application was based in India.

cmrhema