Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem using default /examples/SendMailServlet

Status
Not open for further replies.

dognobbler

Programmer
Jul 4, 2003
46
GB
I have installed Tomcat 4.1.24 and am trying to create a form email. I tested the default SendMailServlet that comes with the server (which is located here /examples/SendMailServlet) and it worked fine.

So what I wanted to do was to edit that servlet to make a few superficial (ie HTML ) changes. When I try to javac that file I get the following errors

sendMail.java:7: package javax.mail does not exist
import javax.mail.Message;
^
sendMail.java:8: package javax.mail does not exist
import javax.mail.Session;
^
sendMail.java:9: package javax.mail does not exist
import javax.mail.Transport;
^
sendMail.java:10: package javax.mail.internet does not exist
import javax.mail.internet.InternetAddress;
^
sendMail.java:11: package javax.mail.internet does not exist
import javax.mail.internet.MimeMessage;


It appear that I am missing the mail package. Could anyone explain to me what I need to do be able to javac this file?

Thanks

Andy
 
You need a jar file called 'mail.jar'. I believe this comes with the sdkee1.4 version, or can be had from
Follow the install instructions from the JavaMail API download, or just stuff the mail.jar in JAVA_HOME\jre\lib\ext.

That should be all you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top