Refactor mail reader to runnable.