fixed mailer bug but not optimal
Merge pull request #23 from alaurenty/fix-mailer

fixed mailer bug but not optimal