Allow to mark new mail as read

I'm currently using the attached patch to mark mails as read, but I have trouble running the tests. What is the procedure to successfully run all tests? I'll add a test for my patch and re-issue the pull request.

Cheers!