Does Ruby have a built-in SMS Class?

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

Trupti Deshpande wrote:

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:

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 @verizon.net or similar.

Hope that helps a little bit.

-Justin

On Aug 9, 2006, at 17:45, Justin C. wrote:

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.

Justin C. wrote:

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 @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 :slight_smile:

On 8/10/06, Justin C. [email protected] wrote:

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.