added mailer functions