60

I want to add the ability to send reminders to people via email and SMS for specific events that they have signed up for on a web application that I am building. The email part is not difficult, but I am wondering where to find a good solution for sending SMS messages.

It would also be a plus if this solution allowed two-way SMS communication with my web application so that people would be able to reply with a CONFIRM or CANCEL type of a message.

Has anyone implemented something like this? Does anyone know of good tools out there?

EDIT: I am realizing that this is more of a "lots of ways to skin this cat" type of question and so I changed it to community wiki.

3
  • +1, I know of a dozen one way SMS API providers, but none that post back if a reply is received.
    – Tim Post
    Commented Jul 9, 2010 at 15:45
  • I added a bounty on this question in hopes of improving the answers on this question.
    – artlung
    Commented Jul 21, 2010 at 15:24
  • jessegavin, If you feel like selecting a best answer, feel free to--the bounty ends tomorrow!
    – artlung
    Commented Jul 27, 2010 at 6:53

11 Answers 11

26
+50

I believe that the new industry leader is Twilio, they have an excellent API and reasonable prices. Some alternatives worth considering are Tropo, Plivo, and Nexmo.

You can also use an SMS Gateway like ClickATell.

Best of luck!

EDIT: I found a question on StackOverflow that has lots more suggestions, some may be outdated.

2
  • I'm using CLickATell as well and I'm satisfied with their service.
    – Alex
    Commented Jul 27, 2010 at 11:30
  • I am going to chime in for Plivo paid service, its very good. We used to use Twilio which is also outstanding but costs more.
    – Frank
    Commented Aug 13, 2014 at 3:11
16

I had a friend who managed to implement this via email. I believe he did it exactly the same way this site recommends:

T-Mobile: phonenumber@tmomail.net
Virgin Mobile: phonenumber@vmobl.com
Cingular: phonenumber@cingularme.com
AT&T: [email protected]
Sprint: phonenumber@messaging.sprintpcs.com
Verizon: phonenumber@vtext.com
Nextel: phonenumber@messaging.nextel.com

where phonenumber = your 10 digit phone number

16
  • 1
    I just tested this out and my carrier (AT&T) added the FROM: [Sender Name], SUBJ: [Subject Line], MSG: [Message Contents] to the beginning of the text message. - So that is (at the very least) 21 characters that get used up with this method. I am thinking that (at least for me) this would not be acceptable for most public facing web applications.
    – jessegavin
    Commented Jul 12, 2010 at 15:17
  • 3
    @artlung en.wikipedia.org/wiki/List_of_carriers_providing_SMS_transitis a pretty comprehensive list.
    – Yahel
    Commented Jul 23, 2010 at 14:21
  • 7
    You mean en.wikipedia.org/wiki/List_of_SMS_gateways, but thanks!
    – artlung
    Commented Jul 23, 2010 at 15:00
  • 2
    In my country (Argentina) you have to pay the SMS received through email (Your customers may not like) Commented Jul 23, 2010 at 16:58
  • 1
    How do you determine who the carrier is?
    – Adam
    Commented Jul 23, 2010 at 19:23
10

I've been using Twilio for voice and I've been quite impressed. I'm sure their SMS system isn't much different. This will allow you to send to any carrier without knowing the email address to send to (as I've noticed they change over time).

2
  • So you're using their API? How are you using it?
    – artlung
    Commented Jul 21, 2010 at 21:42
  • 1
    I'm using their voice API to make calls triggered through PHP scripts. I'm using it to make calls and using it to do voice to text and then accept responses from the user. Commented Jul 23, 2010 at 14:26
6

This is for sending only, but I've used Penny SMS for a project and had good luck with it. If you happen to be using Ruby, check out the penny_sms_muncher gem.

5

Other two options I've considered in the past:

Skype API
Send and receive SMS using new Skype API. I guess Twilio is cheaper, but Skype is available in more countries (if you want to receive SMSs)

Plug a phone to your server
If you live in a country (like Argentina) where SMS gateway companies charge a lot, you may find it cheaper to buy a phone and plug it to your server (depending on your hosting enviroment, of course). Then you can use a software like SMSToolkit to interact with the phone.

0
4

I would recommend looking into the two way api provided by http://www.world-text.com/.

3

I've written such a two ways SMS system using Vidicom UK as the SMS provider (not sure if they are still going). Basically they have an HTTP based API where you can send and receive SMS messages. It's too complex to explain in detail, but in essence I had two database tables, one for incoming messages received from the gateway and another one for outgoing messages that are queued and then sent on to the gateway.

I basically then had to parse the incoming messages to see if they contained keywords such as CANCEL or STOP and then process the message accordingly. Unfortunately, you get a lot of garbage messages - you'd be surprised how many people send SMS messages to the wrong number - so you have to respond back saying "Message not understood" etc.

3

If you want an affordable bulk SMS provider, with a developer API you could use www.SourceSMS.com - they offer international coverage, and they have scripts you can simply download and integrate into your website.

2

Another option is to use PHP's mail function and a list of carrier's email servers, like so:

Make an HTML form on a PHP file,

<select name="carrier" style="width: 130px" >
<option selected="" value="1">Verizon Wireless</option>
<option value="2">Alltel</option>
<option value="3">Boost Mobile</option>
<option value="4">Cingular</option>
<option value="5">Nextel</option>
<option value="6">Sprint</option>
<option value="7">T-Mobile</option>
<option value="8">Virgin Mobile</option>
<option value="9">AT&T</option>
</select>

Then set where the mail will be sent:

if ($carrier == "1") {
    $email = "[email protected]";
} elseif ($carrier == "2") {
    $email = "[email protected]";
} elseif ($carrier == "3") {
    $email = "[email protected]";
} elseif ($carrier == "4") {
    $email = "[email protected]";
} elseif ($carrier == "5") {
    $email = "[email protected]";
} elseif ($carrier == "6") {
    $email = "[email protected]";
} elseif ($carrier == "7") {
    $email = "[email protected]";
} elseif ($carrier == "8") {
    $email = "[email protected]";
} elseif ($carrier == "9") {
    $email = "[email protected]";
}

Send the mail: ($email, $subject, $msg, $mailfrom will need to be defined and in proper format, recommend also sanitizing inputs)

if (mail($email, $subject, $msg, $mailfrom)) {
    echo "<h4>Your Text Was Successfully Sent.</h4>";
    echo "<br />";
    if ($backurl == "") {
        echo "<a href='javascript:history.back(1);'>Back</a>";
    } else {
        echo "<a href='" . $backurl . "'>Back</a>";
    }
    echo "</body></html>";
} else {
    echo "<h4><b>Error Sending Message</b></h4><br>Can't send txt to $to. <br> Contact the site Administrator.";
}

Make sure PHP has valid mail settings in php.ini. If you have any questions, just ask.

1

I am not sure if you would be able to do anything with replies, there are some API's that have been made to implement text functionality with Google Voice.

http://code.google.com/p/pygooglevoice/

http://code.google.com/p/google-voice-java/

1

There are many producers and service providers. I know Ozeki SMS Gateway. The following URLs can help you if you want inhouse solution with own gsm modem or SMPP/UCP/CMD or else provider. When you make a decesion the first question: how many SMS do you want to send or receive?

HTTP SMS API with examples.

SMS API for ASP/ASP.NET Developers and Examples for PHP Developers on how to setup SMS functionality pages can give you usefull information.

Not the answer you're looking for? Browse other questions tagged or ask your own question.