# Does Ruby have a built-in SMS Class?

**URL:** <https://www.ruby-forum.com/t/does-ruby-have-a-built-in-sms-class/64514>\
**Category:** Ruby\
**Created:** [August 9, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/does-ruby-have-a-built-in-sms-class/64514 "2006-08-09T18:31:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trupti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@trupti](https://www.ruby-forum.com/u/trupti)\
**Post date:** [August 9, 2006, 6:31pm UTC](https://www.ruby-forum.com/t/does-ruby-have-a-built-in-sms-class/64514/1 "2006-08-09T18:31:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![trupti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@trupti](https://www.ruby-forum.com/u/trupti)\
**Post date:** [August 9, 2006, 6:50pm UTC](https://www.ruby-forum.com/t/does-ruby-have-a-built-in-sms-class/64514/2 "2006-08-09T18:50:10Z")

</div>

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/](http://raa.ruby-lang.org/project/ruby-sms/)

And a site which is running on rails which sends reminders to your  
phone:

> **[Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.](https://dandelion-paper-30e.notion.site/Ohdontforget-shut-down-notice-677f63d3533c4d1ca854b5a753a707f0)**
>
> A new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team

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

---

<div class="post-metadata">

**Author:** ![trupti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@trupti](https://www.ruby-forum.com/u/trupti)\
**Post date:** [August 9, 2006, 7:05pm UTC](https://www.ruby-forum.com/t/does-ruby-have-a-built-in-sms-class/64514/3 "2006-08-09T19:05:10Z")

</div>

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/](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.

---

<div class="post-metadata">

**Author:** ![trupti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@trupti](https://www.ruby-forum.com/u/trupti)\
**Post date:** [August 9, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/does-ruby-have-a-built-in-sms-class/64514/4 "2006-08-09T19:08:51Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![trupti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@trupti](https://www.ruby-forum.com/u/trupti)\
**Post date:** [August 15, 2006, 2:10pm UTC](https://www.ruby-forum.com/t/does-ruby-have-a-built-in-sms-class/64514/5 "2006-08-15T14:10:36Z")

</div>

On 8/10/06, Justin C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](http://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.
