updated mailer.php

check error messages