implementation of Mailer class & related test case
triggering mail delivery after mail generation