fix image text
[pear] / Mail.php
index 1cffdee..643f1ba 100644 (file)
--- a/Mail.php
+++ b/Mail.php
@@ -71,7 +71,7 @@ class Mail
      * @return object Mail a instance of the driver class or if fails a PEAR Error
      * @access public
      */
-    function &factory($driver, $params = array())
+    static function &factory($driver, $params = array())
     {
         $driver = strtolower($driver);
         @include_once 'Mail/' . $driver . '.php';
@@ -155,7 +155,7 @@ class Mail
         foreach ($headers as $key => $value) {
             $headers[$key] =
                 preg_replace('=((<CR>|<LF>|0x0A/%0A|0x0D/%0D|\\n|\\r)\S).*=i',
-                             null, $value);
+                             '', $value);
         }
     }
 
@@ -268,5 +268,18 @@ class Mail
 
         return $recipients;
     }
+    
+    
+    function &raiseError($message = null,
+                         $code = null,
+                         $mode = null,
+                         $options = null,
+                         $userinfo = null,
+                         $error_class = null,
+                         $skipmsg = false)
+    {
+        $p = new PEAR();
+        return $p->raiseError($message,$code,$mode,$options,$userinfo, $error_class, $skipmsg);
+    }
 
 }