I have to admit, the gmail and yahoo new email interfaces are great, if you don’t mind the advertising, and very easy to use, however i have been using for a long time SquirrelMail to access the email directly on my server!
While the interface that comes with the cpanel installation is very basic, there is one thing i would have liked to have, like in Yahoo, when you get an email, the page title automatically changes with the number of unread emails!
Now, squirrelmail already have this auto-refresh thing, so here is what you need to do in order to get the titles of the top frame updated:
- locate and open on your server the squirrelmail/src/left_main.php file
- locate this line
- Add this code just before the if statement
/* Print unseen information. */ if ($unseen_string != '') {
if($mailbox == 'INBOX'){ if ($unseen_string != ""){ $line .= "<script type='text/javascript'>top.document.title='Inbox ".$unseen_string."'</script>"; }else{ $line .= "<script type='text/javascript'>top.document.title='No unread messages'</script>"; } }
Now, your squirellmail should look like this when getting a new email
And obviously, this will only work for the INBOX folder!
Happy squirrelling 🙂