请大家帮忙看哈,
错在那里 我用的是tomcat
当写到/*(红色)的时候还是对的,,下去一行写
Mimemassage the Message = new MimeMessage(theSession);
这时候就错了,提示:
The server encountered an internal error () that prevented it from fulfilling this request.
难道是怪mail.jar没配置好吗?也不应该啊,Session都能用啊,请大家帮忙啊 都快哭了
<%@page contentType="text/html"%>
<%@page pageEncoding = "GB2312"%>
<%@page import = "java.util.*,java.io.*"%>
<%@page import = "javax.mail.*"%>
<%@page import = "javax.mail.internet.*"%>
<%@page import = "javax.activation.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> mail </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY>
<%
Properties theProperties = System.getProperties();
theProperties.put("mail.host","127.0.0.1");
theProperties.put("mail.transport.protocol","smtp");
out.println("234234tTGSDG5");
Session theSession =
Session.getDefaultInstance(theProperties,null);
theSession.setDebug(false);
MimeMessage theMessage = new MimeMessage(theSession);/*
theMessage.setFrom(new InternetAddress("coffee@fj.com"));/*
theMessage.setRecipients(Message.RecipientType.TO,"35033734@qq.com");
theMessage.setSubject("JavaMail");
theMessage.setText("看哈通了没有","GB2312");
Transport.send(theMessage);
out.println("发送成功");*/
%>
daodidf
</BODY>
</HTML>
[此贴子已经被作者于2007-4-2 12:55:57编辑过]