Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 7b7bb7ab30
Fetching contributors…

Cannot retrieve contributors at this time

74 lines (46 sloc) 2.92 kB


Net::SMS::BulkSMS is a Ruby library that allows you to easily integrate SMS services into your Ruby or RubyOnRails applications.

It has support for all BulkSMS international sites, including the UK, USA, South Africa, Spain and Europe.

To use the library, you will need an account from and some credits.


Creating a new service and sending a message is simple.

s ='myusername', 'mypassword')
s.send_message('Hello, I hope you like my message!', '44799123456')

Additional message options

The Service class also has a send instance method that accepts a Message object. This allows you to construct your own Message objects and set additional parameters.

s ='myusername', 'mypassword')
m ='Hello, look at my funky message', '44799123456')
m.routing_group = 1
m.want_report = 1

Both send and send_message return a Response object.

Checking your account balance

If you already have an existing Service object, you can easily check your account balance.

s ='myusername', 'mypassword')

Alternatively, you can create an Account object directly.

a ='myusername', 'mypassword')

Sending multiple messages with a single http connection

Also you can use a single http connection & send multiple messages using send_multiple method that accepts an array of Message object and return an array of Response object

s ='myusername', 'mypassword')
m1'Hello1, look at my funky message', '44799123456')
m2='Hello2, look at my funky message', '44799123666')
messages << m1
messages << m2

For a further example, see the simple command line client provided.


This library currently only implements a small portion of the API, allowing you to send messages and check your account balance. Further parts of the BulkSMS API may be implemented in the future such as the ability to receive messages and status reports and manage the address book provided by BulkSMS.

A note about testing

I tried to cover the library with unit tests where possible however I'm not very experienced with unit testing network services and all tests require a valid account to run. If anybody could share some advice here it would be much appreciated.


The Original work is made by Luke Redpath (

Modifications have been added by Basayel Said (

Modifications include:

  • fixing a bug related to getting the host of bulksms service.

  • Adding method named (send_multiple) in order to use a single http connection in sending multiple message objects.

  • adding gem spec file to the library.

  • packaging the library as a gem.

Jump to Line
Something went wrong with that request. Please try again.