added some views and mailer functions