public String transformMIME(Mail mail,int type){
		if(type == 1){//ΪBase64ʽ
			encoder = new BASE64Encoder();
			prefix = "=?gbk?B?";
			suffix = "?=";
			transEncoding = "Content-Transfer-Encoding: 8Bit";
			contEncoding = "Content-Transfer-Encoding: base64";
		}
		//װʼͷ
		StringBuffer MIMEContent = new StringBuffer("");
		MIMEContent.append("From: <"+ mail.getFrom() +">\n"+
						   "To: <"+ mail.getTo() +">\n");
		if(!"".equals(mail.getCc())) MIMEContent.append("Cc: <"+mail.getCc()+">\n");
		MIMEContent.append("Subject:"+ getPreAndSuf(mail.getSubject())+"\n");
		
		if("".equals(mail.getExtraFilename())){//ûи
			MIMEContent.append(
					 "Mime-Version: 1.0\n"
                    +"Content-Type: multipart/alternative;\n"
                    +"\tboundary=\"----=_spacelis_alternateive\"\n"
                    +"Content-Transfer-Encoding: 8Bit\n"
                    +"\n"
                    +"------=_spacelis_alternateive\n"
                    +"Content-Type: text/plain;\n" 
                    +"\tcharset=\"gbk\"\n"                     
                    +"Content-Transfer-Encoding: base64\n"
                    +"\n"
                    + encoder.encode(mail.getContent().getBytes())+"\n"
                    +"\n"
                    +"------=_spacelis_alternateive"
                    );
		}else{//и
			MIMEContent.append(
					"Mime-Version: 1.0\n"
					+"Content-Type: multipart/mixed;\n"
					+"\tboundary=\"----=_spacelis_mixed\"\n"
					+"Content-Transfer-Encoding: 8Bit\n"
					+"\n"
					+"------=_spacelis_mixed\n"
					+"Content-Type: multipart/alternative;\n"
					+"\tboundary=\"----=_spacelis_alternative\";\n"
					+"\n"
					+"------=_spacelis_alternative\n"
					+"Content-Type: text/plain;\n"
					+"\tcharset=\"gbk\"\n"
					+"Content-Transfer-Encoding: base64\n"
					+"\n"
					+encoder.encode(mail.getContent().getBytes())+"\n"
					+"\n"
					+"------=_spacelis_alternative\n"
					+"\n"
					+"------=_spacelis_mixed\n"
					+getExtra(mail.getExtraFilename())+"\n"
					+"\n"
					+"------=_spacelis_mixed--"
					);				
		}
			
		return MIMEContent.toString();
	}