adding mailer functionality