fixed mailer, added deploy hook to send emails after deployment