JAVAMAIL
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sarma_challa
Posted On:   Thursday, October 2, 2003 08:54 PM

I am facing the below problem when trying to send attachement email in JSP.I am able to send email successfully from local pc.but getting error when accessing this emailjsp from network.


javax.mail.SendFailedException: Sending failed; nested exception is: class javax.mail.MessagingException: IOException while sending message; nested exception is: java.io.FileNotFoundException: C:Doc3.doc (The system cannot find the path specified) done.

Re: JAVAMAIL

Posted By:   Daniel_Baylon  
Posted On:   Tuesday, October 7, 2003 02:16 PM

You are specifing a physical directory on your PC.



JSP uses specific directories, your application root directory resides at $TOMCAT_HOMEwebappsappdir.



You should put your attachment under your web application directory, and use application.getRealPath(DirName) method on a directory inside your web application directory.



Regards

About | Sitemap | Contact