示例#1
0
文件: ebay.php 项目: Satariall/izurit
 /**
  * Sends error description to e-mail
  * @param string $type Type of error.
  * @param string $details Error details.
  * @param string $siteId Site id.
  * @return bool
  */
 public function sendErrorMail($type, $details, $siteId)
 {
     if (!isset($this->settings[$siteId]["EMAIL_ERRORS"]) || strlen($this->settings[$siteId]["EMAIL_ERRORS"]) <= 0) {
         return false;
     }
     $loggerTypes = Helper::OnEventLogGetAuditTypes();
     $errorType = isset($loggerTypes[$type]) ? $loggerTypes[$type] : $type;
     $fields = array("EMAIL_TO" => $this->settings[$siteId]["EMAIL_ERRORS"], "ERROR_TYPE" => $errorType, "ERROR_DETAILS" => $details);
     $event = new \CEvent();
     return $event->Send("SALE_EBAY_ERROR", $siteId, $fields, "N");
 }