Started a refactoring in the email tests

Some modifications on the test environment were made to ensure that ".delivery" method can be tested. New tests were created to the mailer class, some tests are pending yet.