Email Load

I added a new feature to the contact page that shows you how high (or low) my email queues are, which update once a minute. If the levels are lower, it probably means I’ll get back to your sooner.

26 replies on “Email Load”

For levels I just have a script that open each maildir directory, looks at the number of non-deleted messages, and then stores the number in a DB at an hourly resolution. That script runs one a minute. On that page I show the info for the current hour.

For the outgoing, I already have table logging all incoming and outgoing emails, so it’s just a simple query and a COUNT( DISTINCT ) for the people number.

Rendering the numbers as a chart, using colors to denote how overheated each section is, would convey the basic idea – that you are busy – more effectively.

I particularly like the fact that it indicates priority but I wonder if using the phrase “Low priority” might seem dismissive to people who are anxious about whether or not you will reply to them. Might be better to number High Priority or Urgent emails, then Everything Else.

I wonder if someone could write a plugin that pulled the same info from a specified GMail or Google Apps account, would be good if it could hook into the superb new Priority Inbox feature.

Super cool matt! I wish I had a purpose to use this! I don’t do any customer support. But this would be neat for customer support to use.

For those who are wondering how to do this with your own email, I will try and start you down the right direction. This will work with gmail as an example. But it should work with any IMAP email.

1. you can get the code gmail imap code from

2. where it does the foreach($emails as $email_number) { you would just change this to update your table of how many unread messages that there are in your in box. It would be something like if ($overview[0]->seen == “read”) {
update mysql table

3. Have that run every hour or so updating how many unread there is.

4. To enable some sort of graph in the future you would insert a new row for each time mail is checked. with the date, how many total, and how many unread in the inbox.

I myself was just interested in how matt did this, and this is just one way.

Another way is to use the feed for your gmail account at and just parse the number of unread messages

Comments are closed.