June 06, 2008

blackquery - Blackberry Query via email

Well, while riding the bus the other week and looking for an address it took me about 20 minutes to find it on my browser. I thought it would be faster to send an email, have the email execute a google search, and email the response. Especially on a Blackberry, could be faster. Couldn't find a service that offers that, so I wrote this one in, Perl of course.

If you use it, you need:
1. A Pop account that accepts the emails
2. A SMTP account for sending emails
3. You should have a Yahoo API key, though I used a demo one.
4. You have to install the required Perl modules.

This script can run anywhere, not only a server, and recovers from errors and has a log file.

A few things I learned:

1. Yahoo has better search API's than Google. The Yahoo::Search module was pre-cooked on CPAN. Also Yahoo seems friendlier about the terms of use, Google strictly forbids using the google search APIs and not displaying the results on a web page.

2. Google Gmail is way faster than Yahoo mail due to IMAP. In a odd situation, if you use this script using a Yahoo SMTP server, the YahooSMTP -> Gmail arives faster that YahooSMTP-> Yahoo email address.

3. I thought about embedding some Adsense with the emailed search results, and publish this as a service and make some advertising $ off it. But looks like Adsense requires web pages, and it is against the terms of use to send Adsense via email. And it doesn't seem possible without Javascript, which is not a good option if sending emails to a Blackberry's.

4. Google has a txt message version of this that is better, if you have txt, is 466453, but it is only for addresses.

Enjoy... you need to set it up yourself, because I have this running on my laptop instead of server, so if you send an email to query@recursivetechnology.com, no telling if this script will be running and you could get a delayed response.

Posted by choppen5 at 07:30 PM