Does Ruby have a built-in SMS Class??

  • Thread starter Trupti Deshpande
  • Start date
T

Trupti Deshpande

Can we send SMS using a ruby script from a PC to a mobile?? Does Ruby
have a built-in SMS class? I would appreciate if you could post some
sample code or references for the same.

Thanks
 
J

Justin Collins

Trupti said:
Can we send SMS using a ruby script from a PC to a mobile?? Does Ruby
have a built-in SMS class? I would appreciate if you could post some
sample code or references for the same.

Thanks

No, there's nothing built in. However, some quick Googling found:
http://raa.ruby-lang.org/project/ruby-sms/

And a site which is running on rails which sends reminders to your phone:
http://ohdontforget.com/

But SMS can almost always just be sent as email, right? So you could use
any kind of mailer library or Net/SMTP (in the standard library) to
generate and send emails to your phone's email address. Usually that's
something like <phonenumber>@verizon.net or similar.


Hope that helps a little bit.

-Justin
 
M

Matthew Smillie

No, there's nothing built in. However, some quick Googling found:
http://raa.ruby-lang.org/project/ruby-sms/

And a site which is running on rails which sends reminders to your
phone:
http://ohdontforget.com/

But SMS can almost always just be sent as email, right?

I wish. I know this is common in the US, but elsewhere it's a
premium service if it's available at all.

There's nothing built-in because sending an SMS relies on having some
sort of gateway to a mobile network. Email gateways aren't always
available, and aren't always free when they are available. If you
don't want to use a phone (like the ruby-sms library does), then
you'll have to find a third-party SMS-forwarding service and use
whatever format they prescribe.

matthew smillie.
 
T

Trupti Deshpande

Justin said:
But SMS can almost always just be sent as email, right? So you could use
any kind of mailer library or Net/SMTP (in the standard library) to
generate and send emails to your phone's email address. Usually that's
something like <phonenumber>@verizon.net or similar.


Hope that helps a little bit.

-Justin

Hey thanks Justin , completely slipped my dud mind , that I can send it
as an email as well..actually what I thought was I might not get an
alert for an email message received ...the way you have for SMS. Anywas
would consider that approach
thanks again :)
 
D

Dido Sevilla

But SMS can almost always just be sent as email, right?

No. I've worked with all of the major mobile carriers in my country
and none of them have ever provided an email to SMS gateway
themselves. They've provided an interface to their SMS centers
instead. What I find more flexible would be to set up Kannel
(www.kannel.org) and use it to interface with the mobile carrier's
SMSC (or to a wireless/GSM modem). Kannel provides you with an HTTP
GET interface to send SMS, and if you want to receive SMS Kannel will
act as an HTTP client to a server you designate and submit the message
received also via HTTP.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,786
Messages
2,569,626
Members
45,328
Latest member
66Teonna9

Latest Threads

Top