Update! After reading the theory on this page you should go to this page to find a simpler, better solution.
Ok this hack might not be for everyone, but if you have Gmail set up to check your pop accounts they don’t let you set the polling frequency anywhere. This can be bad because it makes you go to the settings page to be able to hit the refresh button on each one of your accounts! After a little digging it turns out it uses a weird formula to determine the polling frequency. Let’s say it checks your account and finds an email. The next time it checks it will wait for _slightly less time_ before it checks again. If it finds email a second time it will continue to shorten the interval until it is checking every 5 minutes or so (maybe even less!) The purpose of this is so that google doesn’t waste resources checking an account that only gets one email a month.
The downside of this approach is that if you are eagerly waiting for that one email you might be waiting for a long time (i have seen wait times up to 58 minutes!)
The answer is very simple once you know how it works – get more email! I didn’t want to test to see if the spam filter counts spam received as real mail. I doubt that it does. So I did the next best thing – I automated sending myself email!
I have thought of two different ways of doing this both are mac only, but there must be a billion ways to skin this cat!
The better way I created is to use an automator action to run an applescript from macosxhints to fill out and send an email from mail.app. (mail.app must be configured to send email on your computer already) You must obviously replace the fields in the sample script to ones that apply for you. Give it a distinctive subject so you can filter it out easily later on. Copy your edited script and open up automator. In Automator go to Library>utlities>run applescript. Paste your script in the window that pops up to the right. Then repeat the steps to add a second applescript. Paste in this code.
tell application "System Events"
set visible of process "Mail" to false
end tell
That code hides mail.app after it is done sending the mail. Finally, save your workflow out with a snazzy name.
The automator window should look like this
The next piece is that I used the “Automator Loop Utility” from automator.us to put this automator workflow in a loop. Download the app, and drag your workflow onto it. It will ask you how quickly you want the loop to loop in seconds. Set it to something reasonable (I used 500 seconds, it probably could be even more realistically) Then the app will save out an application that is your automator workflow, all looped up!
The last piece is to go into Gmail and set up a mail filter to auto-delete these emails when they come in. You don’t want them cluttering up your inbox, now do you?! The easiest way to do it is to double click the app you made in the last step. It should send an email. Wait for it to get into your gmail account and open it up. click on “more actions” and then on “filter messages like these” Be sure to add your custom subject into the filter, and finish setting up the filter.
That ought to be it!
I was able to get Gmail so that it checked my mail every 5 minutes. I might have been able to get it even lower, but I don’t really want to abuse the system here. This technique does have its problems though. For one you have to have your computer running and connected all_the_time for this to work. That’s kind of a drag. Secondly it sucks having mail.app flick to the front and then away every x00 seconds. If anyone finds a better solution (command line hackers-anyone??) I would love to hear about it!
Hopefully this helps.
Oh yeah, if you are wondering how to quit the looping app that you made, just click and hold on it in the dock, and then select quit from the pop up menu!
Thank you very much, that’s actually a brilliant idea that I’m going to implement right away.
What I did previously was setup a dedicated machine with a macro to click the check mail now link every minute or two. But its a large resource for a simple task, setting up an auto email dripper like you suggest to trick the algo is greener than having a dedicated machine to click the screen. My method needed to be on a dedicated box because it takes over your mouse and if you use it on your daily driver you cant get anything done. Thanks alot.
While I have been frustrated by the lag in polling in Gmail as well, I do not think generating what is essentially junk mail is a solution. It’s also not very green — if everyone did this, think of all those extra electrons needed to send these garbage emails. Unfortunately, I do not have a better option other than to complain to Google about it.
Great! Now how do you do it in Windows?
Well, I prefer to not receive spam and use it on Linux.
I have another solution:
Using mainly the Gmail application (in Firefox) to manage my e-mail, I easily could install this Greasemonkey script: http://www.eclarsys.com/popgrabber (Greasemonkey addon is required) which adds a “Refresh Pop3 Accounts” link to your folder views (inbox, starred, chats, etc.).
Logging in to use Gmail can be quicker by checking “Stay signed in” and placing a link on your desktop or ….
If you don’t trust Gmail saving your login information, this link is to sign in automatically :
https://www.google.com/accounts/ServiceLoginAuth?continue=http://mail.google.com/gmail&service=mail&Email=%5BYourEmailHere%5D&Passwd=%5BYourPasswordHere%5D&null=Sign+in
Another possibilty (by Lifehacker) is nearly the same as the one in this post. You only use mailinglists to receive more e-mails and not software.
Tip:
Install Greasemonkey in Portable Firefox (portableapps.com) to make it all portable (USB, File Server, etc.)!
My other post got deleted … Why?
If my other post ever gets posted, there’s a mistake in it. The URL of the Greasemonkey script is : http://userscripts.org/scripts/reviews/51516
Hi Floris, sorry it took so long to get your post up. It did indeed get caught in the spam filter. I fixed it though. You had some good points! Thanks for commenting!
has anyone tried this greasemonkey script?
danielslaughter com/projects/gmail-pop3-checker-for-greasemonkey/
to receive a mail every 5 min, if you have a web server available … a small script in php:
<?php
$to = "you@youremailprovider.com";
$subject = "running email";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("Message successfully sent!”);
} else {
echo(“Message delivery failed…”);
}
?>
… and you browse to the page for a while … as long the page is open you will receive this email…
Thanks Dido! I think the problem with that method is that it requires the page to be open all of the time. Is there any way I could run a similar script via cron on my desktop? That way it would be in the background all of the time and I wouldn’t need to worry about closing windows.
As you all probably know there’s Gmail Labs feature called “Refresh POP accounts” that updates the Refresh button on the Gmail page to check POP mail accounts as well. This makes it possible to use it anywhere regardless of browser or computer.
http://googlesystem.blogspot.com/2010/03/refresh-pop3-accounts-in-gmail.html
Great idea! For those of you saying you don’t want “more spam,” just set a filter in gmail to auto archive emails with the subject line of your auto email.
tried it in LION, no errors – but this does not refresh my inbox any more frequently – i am trying to get my mail history downloaded using POP.
Hi Grantdoug!
It sounds like you’re almost there! I’m not running this on lion, so I can’t give you any tips. I would love to post it here if you do figure it out though. Good luck!