最好的邮件编码解码类,再没有比这个好的了!贴不下了(2)6


y,1,strlen($boundary)-2);
        $boundary = "--".$boundary;
        return $boundary;
    }

    function set_as($email,$type=1) {
        $status = ($type)?"Y":"N";
        $tempmail = $this->fetch_structure($email);
        $thisheader = $tempmail["header"];
        $mail_info = $this->get_mail_info($thisheader);
        $decoded_headers = $this->decode_header($thisheader);

        while(list($key,$val) = each($decoded_headers))
            if (eregi("status",$key)) {
                $newmail .= ucfirst($key).": $status\r\n"; $headerok = 1;
            } else $newmail .= ucfirst($key).": ".trim($val)."\r\n";
        if(!$headerok) $newmail .= "Status: $status\r\n";
        $newmail = trim($newmail)."\r\n\r\n".trim($tempmail["body"]);
        return $newmail;
    }

}
?>
Copyright © 2008 chengduxinxi.com All Rights Reserved PHP编程开发 由朝夕网络维护