I've always been bothered by Mail.app's "Working Offline" mode. I have two email accounts -- one for my domain and one for Gmail. If the POP server for one of them (or my network connection) goes down, Mail fails silently and won't check that account for new mail until I manually bring that account back online.
I finally wrote an AppleScript to get around this annoying problem.
Open up Script Editor and paste in the following code:
on checkall()
tell application "Mail"
repeat with each_account in every account
tell each_account
check for new mail for each_account
end tell
end repeat
end tell
end checkall
on isrunning()
tell application "System Events" to ¬
set mail_running to (exists process "Mail")
return mail_running
end isrunning
on runloop()
repeat
if isrunning() then checkall()
delay 1 * minutes
-- change this number to how often you want to
--check all of your accounts for new mail.
end repeat
end runloop
runloop()
Choose Save As... from the File menu. Change 'File Format' to Application Bundle, make sure that none of the checkboxes are checked, and save the file into your Home folder or your Applications folder (well, anywhere, for that matter). Call it "Mail Checker" (or something like that). Just make sure you remember where you save it.
<key>NSUIElement</key>
<string>1</string>
Now save the file. This step simply makes the dock icon for the application hidden -- you don't want to have an application icon appear in your dock every time it checks for new mail. Close the document window and the "Contents" finder window, but leave the other Finder window (containing the Mail Checker script) open.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050226180321946