Thoughts on Rails

Riding the Train of Thought

Phone-SMS to Gmail 2-way Gateway

leave a comment »



  1. I don’t like to type messages on mobile’s touchscreen keyboard when at computer.
  2. I want a backup of all my communication – including text messages, received and sent.


  1. Forward all text messages to email.
  2. Reply sent to this email generates a sms from phone and is sent to the original text sender.

Actual Implementation:


  1. Install PythonS60 + PythonScriptShell on mobile
  2. Install Sydewynder framework
  3. Modify the example script in Sydewynder to send data to a url via http GET.
  4. Add a small patch to find out the phone number of the message sender (workaround for PyS60 API limitation)
  5. Create a Google App Engine application to handle the http GET request.
  6. Grab the data, dump into email subject and body and send to my email address.
  1. Subject format: Firstname Lastname [+91phonenumber]
  2. Body: message
  • Set up gmail filters to label incoming message as SMS and never send to spam.
  • Replying/Sending:

    1. Install and set up FromSMS on your Symbian phone ( )
    2. Set up app engine to receive and process emails.
    3. Reply to the received email, remember to remove all extra text (inline quote, signatures)
    4. Catch the email in appengine application, parse the phone number from the subject.
    5. Using the fromsms api-id, phone number and body content send data to FromSMS API via urlfetch https/POST.
    6. Assuming you have set up FromSMS properly, it will send out the text message to the phone number.

    The complexity of this whole setup is not in coding: the code is barely few lines, but it is in the overhead – of knowing Python APIs for S60 and for Google App Engine, and installing three pieces of software on phone (+ installing Sydewynder needs copying a bunch of files to memory card), and finally using Python scriptshell to ensure the app keeps running at all times.

    Anybody with a little inclination can build this project in a short amount of time. I took about 90 minutes, from idea to implementation, including research on available solutions (and finding FromSMS). About 45 minutes to write this down.

    Why am I not sharing this code right away? Because I’m going to share more and more ideas from now on. Ideas are more powerful than code. And they make you think. If you are building this for yourself, feel free to contact me for help.

    If you are a non-geek friend, and have read till here… and you want this feature, let me know – but beware, theoretically, I will be able to read all your sms correspondence. It is another matter if I’m even interested – have more than enough on my own phone!


    Written by hiway

    April 16, 2011 at 6:15 am

    Posted in software

    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 )

    Google+ photo

    You are commenting using your Google+ 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 )


    Connecting to %s

    %d bloggers like this: