added more docs and tests to the email viewer