Hacking Gmail to push fetched email
Gmail has “fetch” capability which enables grabbing messages from other POP accounts at a rate of approximately once every hour.
Slow…I use this to automatically grab my work email from an exchange server, tag it, and forward it to my cell phone via text message (my # @ messaging.sprintpcs.com). This allows me to filter and log all messages in Gmail while pushing to mobile, albeit very slowly.
The Fix Part I
Gmail uses an ajax request to force a check on the email account when you click “Check Now” in Account Settings. By using firebug to grab the link that the GET request is sent to, we can just automate sending to that URI.
I did a quick jQuery script to send a GET to that URI at a timed interval. About 7 lines of code, and just let it run in a browser. It kinda worked I think. I can get my requests down to every 5 minutes. Considering it takes about a minute to check the mail, I guess that’s not to bad.Now, on to a real server side program that can completely automate this reliably! :D