Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, October 14, 2026

Diff for Metafox/lib/Mail.php between version 1.1 and 1.2

version 1.1, 2005/06/05 12:13:52 version 1.2, 2005/11/07 20:37:10
Line 46  class Mail
Line 46  class Mail
      * @return object Mail a instance of the driver class or if fails a PEAR Error       * @return object Mail a instance of the driver class or if fails a PEAR Error
      * @access public       * @access public
      */       */
     function factory($driver, $params = array())      function &factory($driver, $params = array())
     {      {
         $driver = strtolower($driver);          $driver = strtolower($driver);
         @include_once 'Mail/' . $driver . '.php';          @include_once 'Mail/' . $driver . '.php';
         $class = 'Mail_' . $driver;          $class = 'Mail_' . $driver;
         if (class_exists($class)) {          if (class_exists($class)) {
             return new $class($params);              $mailer = new $class($params);
               return $mailer;
         } else {          } else {
             return PEAR::raiseError('Unable to find class for driver ' . $driver);              return PEAR::raiseError('Unable to find class for driver ' . $driver);
         }          }
Line 145  class Mail
Line 146  class Mail
   
                 $lines[] = $key . ': ' . $value;                  $lines[] = $key . ': ' . $value;
             } elseif (strcasecmp($key, 'Received') === 0) {              } elseif (strcasecmp($key, 'Received') === 0) {
                   $received = array();
                   if (is_array($value)) {
                       foreach ($value as $line) {
                           $received[] = $key . ': ' . $line;
                       }
                   }
                   else {
                       $received[] = $key . ': ' . $value;
                   }
                 // Put Received: headers at the top.  Spam detectors often                  // Put Received: headers at the top.  Spam detectors often
                 // flag messages with Received: headers after the Subject:                  // flag messages with Received: headers after the Subject:
                 // as spam.                  // as spam.
                 array_unshift($lines, $key . ': ' . $value);                  $lines = array_merge($received, $lines);
             } else {              } else {
                 // If $value is an array (i.e., a list of addresses), convert                  // If $value is an array (i.e., a list of addresses), convert
                 // it to a comma-delimited string of its elements (addresses).                  // it to a comma-delimited string of its elements (addresses).

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top