Example #1
0
 public static function text(Exception $e)
 {
     return sprintf('%s [ %s ]: %s ~ %s [ %d ]', get_class($e), $e->getCode(), strip_tags($e->getMessage()), keke_debug::path($e->getFile()), $e->getLine());
 }
Example #2
0
 public function Mail($from)
 {
     $this->error = null;
     if (!$this->connected()) {
         $this->error = array("error" => "Called Mail() without being connected");
         return false;
     }
     $useVerp = $this->do_verp ? "XVERP" : "";
     fputs($this->smtp_conn, "MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF);
     $rply = $this->get_lines();
     $code = substr($rply, 0, 3);
     if ($this->do_debug >= 2) {
         echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '<br />';
     }
     if ($code != 250) {
         $this->error = array("error" => "MAIL not accepted from server", "smtp_code" => $code, "smtp_msg" => substr($rply, 4));
         if ($this->do_debug >= 1) {
             error_handler(01, "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '<br />' . keke_debug::dump($this->error));
         }
         return false;
     }
     return true;
 }