From 035cf12feab959bad4d24ce8166d0218f6388d7d Mon Sep 17 00:00:00 2001 From: rWatcher Date: Wed, 24 Feb 2010 20:54:24 -0500 Subject: [PATCH] Updated for RC1. --- modules/phpmailer/libraries/Sendmail.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/modules/phpmailer/libraries/Sendmail.php b/modules/phpmailer/libraries/Sendmail.php index 8332b659..a97d273f 100644 --- a/modules/phpmailer/libraries/Sendmail.php +++ b/modules/phpmailer/libraries/Sendmail.php @@ -52,6 +52,7 @@ class Sendmail_Core { break; case "header": if (count($value) != 2) { + Kohana_Log::add("error", wordwrap("Invalid header parameters\n" . Kohana::debug($value))); throw new Exception("@todo INVALID_HEADER_PARAMETERS"); } $this->headers[$value[0]] = $value[1]; @@ -70,6 +71,7 @@ class Sendmail_Core { public function send() { if (empty($this->to)) { + Kohana_Log::add("error", wordwrap("Sending mail failed:\nNo to address specified")); throw new Exception("@todo TO_IS_REQUIRED_FOR_MAIL"); } $to = implode(", ", $this->to); @@ -84,8 +86,6 @@ class Sendmail_Core { $headers = implode($this->header_separator, $headers); $message = wordwrap($this->message, $this->line_length, "\n"); if (!$this->mail($to, $this->subject, $message, $headers)) { - Kohana::log("error", wordwrap("Sending mail failed:\nTo: $to\n $this->subject\n" . - "Headers: $headers\n $this->message")); throw new Exception("@todo SEND_MAIL_FAILED"); } return $this; @@ -117,10 +117,6 @@ class Sendmail_Core { $mail->Subject = $subject; $mail->Body = $message; - if ($mail->Send()) { - return true; - } else { - return false; - } + return $mail->Send(); } -} \ No newline at end of file +}