Sending SMS through the Cablecom ( web interface (howto)

I wanted to be able to send SMS from the command line to my phone automatically (e.g. to get notified of certain emails). I use Cablecom, which offer the service of sending SMS through a web interface to subscribers. I found smssend (a seemingly dead package, but still available in some distributions), which has a scripting mini-language to allow writing plugins for any web-based service, but I could not get it to work. Finally, I decided to write it from scratch using Perl’s WWW::Mechanize package, and it turned out to be extremely easy. I borrowed the logic from SwissSMS (which is extremely nice and includes a plugin, but it’s a GUI-only program).

Download the script: You also need the WWW::Mechanize and Crypt::SSLeay (for SSL support) packages.

How to use it: [--login=login] [-pass=pass] phonenumber message

You can hardcode the login and password in the script to avoid specifying them every time – see the top of the script.


3 responses to “Sending SMS through the Cablecom ( web interface (howto)

  1. Hello, SwissSMS is not a GUI only program.

    You can use it from command line, as explained in SwissSMS help page.

    $ SwissSMS -s HispeedCH -r 0791234567 -l myLogin -p myPassword < message.txt

  2. Nicolas, thank you! I had never realized that – or looked at the help, obviously 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s