centralize sendMail function in MDbifCommon; send email upon internal error