[IMP] Improve code of mail tests.