Another way to accomplish this is to use the carrier's email-to-SMS gateway. For example, if the phone is on Verizon's network and has phone number 555-111-5555, you can use a module like Mail::Sendmail to send a message to email@example.com, and it will be received on the phone as a text message. I think all major cell carriers have such a gateway. The user on the phone can also reply, and the answer will go to the email address you used. (I'm not sure if it prioritizes the SMTP envelope address or the From: or Reply-To: address; I always just use the same address for all three.)
I actually have a Perl script I wrote that, in addition to letting me send texts, also monitors my POP3 inboxes and watches for replies, then sends them to me as a /msg on IRC. I can then answer like /msg botname !sms Whoever blah blah blah, and my Perl script looks up Whoever in its database, gets the phone number and carrier, constructs the email, and sends it, and my sister (or whoever) gets it on her phone.