Re-throw PEAR_Error as exception.
authorJan Schneider <jan@horde.org>
Sun, 6 Sep 2009 16:39:45 +0000 (18:39 +0200)
committerJan Schneider <jan@horde.org>
Sun, 6 Sep 2009 16:39:45 +0000 (18:39 +0200)
framework/Mime/lib/Horde/Mime/Part.php

index 1cab6e9..b7d8766 100644 (file)
@@ -1371,6 +1371,9 @@ class Horde_Mime_Part
     public function send($email, $headers, $driver, $params = array())
     {
         $mailer = Mail::factory($driver, $params);
+        if ($mailer instanceof PEAR_Error) {
+            throw new Horde_Mime_Exception($mailer);
+        }
 
         $old_basepart = $this->_basepart;
         $this->_basepart = true;