fix a unit test, add a function to grab all emails received or sent to a user