I want to add a send email function in my JSP server (WinXP + Apache + Tomcat), and download "JAVA Mail API" from web, I extract the zip file and find there are a file named activation.jar, some *.java example file and some doc files.
But I don't know how to use this *.jar file, I copy it to the lib directory under tomcat, restart the server, and run the following JSP page ============= <%@ page import="java.util.*" %> <%@ page import="javax.mail.*" %> <%@ page import="javax.mail.internet.*" %> <% java.util.Properties props = new java.util.Properties(); props.put("mail.smtp.host", [SMTP Server]); Session mailSession = Session.getDefaultInstance(props,null); InternetAddress fromAddress = new InternetAddress([Email Address]); %> =========== But the following error is return... =========== Session cannot be resolved or is not a type =========== Am I miss some steps in using the jar? And I also want to know how to use those .java example file. Source code is return when viewing them in browser. Thank in advance =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant archives, FAQs and Forums on JSPs can be found at: http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com