mailer functionality working properly