components/PhpMailer.php
function encode_file ($path, $encoding = "base64") {
      if(!@$fd = fopen($path, "rb"))
      {
         $this->error_handler(sprintf("File Error: Could not open file %s", $path));
         return false;
      }
      $file = fread($fd, filesize($path));
      $encoded = $this->encode_string($file, $encoding);
      fclose($fd);

      return($encoded);
   }
function encode_file ($path, $encoding = "base64") {
      if(!@$fd = fopen($path, "rb"))
      {
         $this->error_handler(sprintf("File Error: Could not open file %s", $path));
         return false;
      }
      $file = fread($fd, filesize($path));
      $encoded = $this->encode_string($file, $encoding);
      fclose($fd);

      return($encoded);
   }
function encode_file ( $ path , $ encoding = "base64" ) { if ( ! @ $ fd = fopen ( $ path , "rb" ) ) { $ this -> error_handler ( sprintf ( "File Error: Could not open file %s" , $ path ) ) ; return false ; } $ file = fread ( $ fd , filesize ( $ path ) ) ; $ encoded = $ this -> encode_string ( $ file , $ encoding ) ; fclose ( $ fd ) ; return ( $ encoded ) ; }
Encodes attachment in requested format.  Returns a
string if successful or false if unsuccessful.
@private
@returns string
Encodes attachment in requested format . Returns a string if successful or false if unsuccessful .