Fix a bug that I think I introduced in my last sendmail refactor where

I inverted the expectations on the result from mail() causing image
uploads to fail (even though the mail gets sent!)
This commit is contained in:
Bharat Mediratta
2009-02-08 20:01:15 +00:00
parent 0f13f12638
commit b31c79a71f
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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");