EmailBag tests and fixes