Implemented mail reporting.
Only sending one mail for each fail and up again registered.
Merge pull request #3 from kaspernj/kj/mail_reporting_impl

Mail reporting implementation