diff options
-rw-r--r-- | core/libraries/Sendmail.php | 2 | ||||
-rw-r--r-- | core/tests/Sendmail_Test.php | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/core/libraries/Sendmail.php b/core/libraries/Sendmail.php index 88b74255..a1092734 100644 --- a/core/libraries/Sendmail.php +++ b/core/libraries/Sendmail.php @@ -83,7 +83,7 @@ class Sendmail_Core { // need to use a single \n. This can be set in config/sendmail.php $headers = implode($this->header_separator, $headers); $message = wordwrap($this->message, $this->line_length, "\n"); - if ($this->mail($to, $this->subject, $message, $headers)) { + 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"); diff --git a/core/tests/Sendmail_Test.php b/core/tests/Sendmail_Test.php index 4e813b16..777fea55 100644 --- a/core/tests/Sendmail_Test.php +++ b/core/tests/Sendmail_Test.php @@ -110,5 +110,6 @@ class Sendmail_For_Test extends Sendmail { public function mail($to, $subject, $message, $headers) { $this->send_text = "To: $to\r\n{$headers}\r\nSubject: $this->subject\r\n\r\n$message"; + return true; } }
\ No newline at end of file |