added mail_report_errors configuration

+ better RegEx support