Horas and konnichiwa untuk semua


Poor man’s blackberry
June 7, 2007, 11:39 pm
Filed under: en/Mobile

Almost any recent cellular phone in Japan has all that Blackberry has and much more, minus one (i.e., integration with corporate Exchange server, but this is available as optional service). But when traveling outside Japan while needing to read and responds in Japanese, all I have is poor man’s Blackberry, and it took me years to come to this point. Here is how to “make” one:1. Make sure GPRS settings are correct and GPRS is activated by the operator for your subscription.2. You need to be able to use procmail to forward your emails, and has web-based sms sending service subscription that is cheap enough to warrant the name “poor”;)3. Use a standard Japanese-capable handset (assuming that, like me, you need to deal with Japanese mails).4. Get Gmail account.5. Download mobile Gmail application from the following URL and install.http://gmail.com/appNow you are set to receive and send email like with any cell phone in Japan.6. Get real time notification of email arrival using SMS, by setting up a procmail recipe and perl script as follows::0 c* ^From:*\/.* |./sendsms.pl $MATCHThe “sendsms.pl” called above could be like this:

#!/usr/bin/perluse LWP::UserAgent;my $ua = LWP::UserAgent->new;$ua->timeout(10);$ua->agent('Mozilla');my $argc = @ARGV;my $from;my $subject;if ($argc>0) { $from = $ARGV[0]; } else { $from = "uknown"; }#if ($argc>1) { $subject = $ARGV[1]; }my $smsbody = "Mail from $from: $subject";my $posturl = "https://theurltowebbasedsms";my $req = HTTP::Request->new(POST => $posturl);my $res = $ua->request($req);

So whenever an email arrived, the procmail recipe above will get the sender’s information (From: field) and pass it to the perl script, which will send it as sms via web interface to my cell phone7. Voila, the poor man’s blackberry is now ready to tell you in real time that an email has arrived (at Gmail’s email server) and ready to be read (via Gmail’s Java application;).