/** * Mail error report * * @param string $msg an error message * @return bool true for message sent properly */ public static function mailErrors($msg) { $to = QubitOai::getAdminEmail(); $from = $to; $subject = 'Qubit OAI-PMH Harvest'; $message = $msg; $headers = "From: {QubitOai::getAdminEmail()}\r\nX-Mailer: PHP/" . phpversion(); $params = sprintf('-oi -f %s', $from); return mail($to, $subject, $message, $headers, $params); }