
<%
//延楚蕗苧
Java.lang.String smtp,from,to,cc,bcc,subject,body; 

//資誼喘薩補秘方象
smtp = request.getParameter("smtp");
from = request.getParameter("from");
to = request.getParameter("to");
cc = request.getParameter("cc");
bcc = request.getParameter("bcc");
subject = request.getParameter("subject");
if(subject!=null){
subject = new Java.lang.String(subject.getBytes("iso-8859-1"));
}
body = request.getParameter("body");
//窟僕喨周
mymail.mail.HTML.send(smtp,from,to,cc,bcc,subject,body);
%> 

mymail.jaf.StringDataSource.Java
package mymail.jaf;
public class StringDataSource implements Javax.activation.DataSource
{
private Java.lang.String data;
　　private Java.lang.String type; 

　　　　public StringDataSource(Java.lang.String data,Java.lang.String type){
　　　　　　　　this.data = data;
　　this.type = type;
　　} 

　　　　public Java.io.InputStream getInputStream() throws Java.io.IOException{
　　　　　　　　return new Java.io.StringBufferInputStream(data);
} 

　　public Java.io.OutputStream getOutputStream() throws Java.io.IOException{
　　　　　　throw new Java.io.IOException("it does not support this method now!");
　} 

　public Java.lang.String getContentType(){
　　　　　　　　　　return type;
} 

　　public Java.lang.String getName(){
　　　　　　return " mymail ";
}
} 