hasData() ) { return $mail; } do { $this->partParser = new ezcMailRfc822Parser(); $data = ""; while ( ( $data = $set->getNextLine() ) !== null ) { $this->partParser->parseBody( $data ); } $mail[] = $this->partParser->finish( $class ); } while ( $set->nextMail() ); return $mail; } /** * Sets the temporary directory. * * The temporary directory must be writeable by PHP. It will be used to store * file attachments. * * @todo throw if the directory is not writeable. * @param string $dir */ public static function setTmpDir( $dir ) { self::$tmpDir = $dir; } /** * Returns the temporary directory. * * If no temporary directory has been set this method defaults to * /tmp/ for linux and c:\tmp\ for windows. * * @returns string */ public static function getTmpDir() { if ( self::$tmpDir === null ) { $uname = php_uname(); if ( strtoupper( substr( $uname, 0, 3 ) == "WIN" ) ) { self::$tmpDir = "c:\\tmp\\"; } else { self::$tmpDir = "/tmp/"; } } return self::$tmpDir; } } ?>