Down and dirty with SquirrelMail

SquirrelMail Logo
SquirrelMail Logo

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:

  1. locate and open on your server the squirrelmail/src/left_main.php file
  2. locate this line
  3. /* Print unseen information. */
    if ($unseen_string != '') {
  4. Add this code just before the if statement
  5. 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

squirrelmail

And obviously, this will only work for the INBOX folder!

Happy squirrelling 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *