Merging tests and adding mailclass and mail.py