# Re: Sending SMS from rails

**URL:** <https://www.ruby-forum.com/t/re-sending-sms-from-rails/130931>\
**Category:** Rails\
**Created:** [March 4, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/re-sending-sms-from-rails/130931 "2008-03-04T16:08:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [March 4, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/re-sending-sms-from-rails/130931/1 "2008-03-04T16:08:39Z")

</div>

Clickatell is easy enough to use but cost about .064 / message.

You just need to post to a url  
uri\_str =  
“[http://api.clickatell.com/http/sendmsg?user=&password=&api\_id=&to=&text=Test+from+textagog+-+testing+how+long+a+sms+takes](http://api.clickatell.com/http/sendmsg?user=&password=&api_id=&to=&text=Test+from+textagog+-+testing+how+long+a+sms+takes)”  
response = Net::HTTP.get\_response(URI.parse(uri\_str))

then check the response for Net::HTTPSuccess and look for the clickatell  
confirmation ID

if response.body =~ /^ID:/

----- Original Message ----  
From: Jason R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
To: removed\_email\_address@domain.invalid  
Sent: Tuesday, March 4, 2008 9:43:41 AM  
Subject: [Rails] Re: Sending SMS from rails

For the record, all carriers have an email SMS system.

Sprint: [10-digit number]@messaging.sprintpcs.com  
Cingular / ATT : [number]@txt.att.com

These services are of course free, and subject to limitations and  
possibly delays. If you need to send a ton of SMSes out, or need  
guarenteed quick delivery, you’ll need to look into an SMS gateway  
service like clickatell.

Jason

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [March 4, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/re-sending-sms-from-rails/130931/2 "2008-03-04T17:41:10Z")

</div>

Thank you all, I’m already using a gateway and everything in fine in  
terms  
of sending messages from my app, my last question was just about the  
Unicode  
issue.

Thanks

On 04/03/2008, Mark S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Sprint: [10-digit number]@messaging.sprintpcs.com
> 
> > Hi,  
> > Thank you very much for your helpful suggestions.
> > 
> > > > username=xxxx&password=xxxx&mno=999999&msg=Hi from  
> > > > exposed in a way or another to some bad user? Is there something  
> > > > Fred
> > > > 
> > > > > Yes. But it’s part of the standard ruby library and you won’t get
> > > > > 
> > > > > >
> 
> [http://www.domain.com/sendsms/sendsms.asp?username=xxxx&password=xxxx&mno=999999&msg=xxx](http://www.domain.com/sendsms/sendsms.asp?username=xxxx&password=xxxx&mno=999999&msg=xxx)
> 
> > > > > > > 
> > > > > > 
> > > > > > method to the Message model which does the necessary dtugg.
> > > > > > 
> > > > > > > ```
> > > > > > > flash[:notice] = 'Message was successfully created.'
> > > > > > > 
> > > > > > > ```
> > > > > > 
> > > > > > –
> 
> >

–  
Anas Marrawi  
Visit me at: [www.anasonline.net](http://www.anasonline.net)
