public function appendFromFile($mailbox, $path, $headers=null, $flags = array(), $date = null, $binary = false)
    {
        // open message file
        if (file_exists(realpath($path))) {
            $fp = fopen($path, 'r');
        }

        if (!$fp) {
            $this->setError(self::ERROR_UNKNOWN, "Couldn't open $path for reading");
            return false;
        }

        $message = array();
        if ($headers) {
            $message[] = trim($headers, "\r\n") . "\r\n\r\n";
        }
        $message[] = $fp;

        return $this->append($mailbox, $message, $flags, $date, $binary);
    }