SMS Agent project idea

Tired of not having an iPhone, I decided to see what I could do with my existing horriblePhone and free incoming SMS. It turns out that my cell provider ( (as well as quite a few others) provide a free SMS-to-email (and vice versa) service. Since Gmail provides optional POP3 and SMTP interfaces, and CPAN has modules for dealing them, I wondered what I could accomplish with a little bit of Perl, a 15 cent SMS, and ~140 character page breaks.

Right now, I have a hacked-together script running every ten seconds which reads a Gmail account and dispatches requests based on the first word to custom handlers (no strict ‘refs’ for the win.) It emails back the results ~130 characters at a time, in reverse for easier reading, and two seconds apart to keep messages in order. So far, the only usable handler is “w” for Wikipedia. Here’s an example communicae (with order reversed again for readability):

w porkchop
A 'pork chop' is a chop of pork.

The center cut or pork loin chop includes a large T shaped bone, and is structurally>
<similar to the beef t-bone steak. Rib chops come from the rib portion of the loin, and are similar to rib eye steaks.>
<Blade or shoulder chops are cut from the shoulder end of the loin, and tend to contain large amounts of connective>
<tissue. The sirloin chop is taken from the (rear) leg end and also contains a large amount of connective tissue.

<so-called "Iowa Chop" is a thick center cut. The term was coined in 1976 by the Iowa Pork Producers Association.

Next up is database storage (so that I can implement a “more” handler), refactoring into sane modules, setting the thing up as a service which runs all the time and only reconnects to POP3 when necessary, and adding more useful handlers. Some ideas include Google Transit, Translink current conditions, dictionary/thesaurus, and 411+address.


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

%d bloggers like this: