change email method to action mailer