fixed errors in mailer.