Mailer made from my old code and rails tutorial