integrated mailer functionality and created rake task