fix mailer issues
Merge pull request #16 from dreamwords/master

Fix mailer issues.