Why an agent? Why not simply filter by unread, select all and mark as read? I recently did this with my email accounts which has many thousands of unread emails.