View Full Version : Error with Javamail attachments

10-03-2002, 08:15 PM

I am trying to send an email with an attachment from an HTML form using javamail in a JSP. In testing from my local machine running Apache with JDK 1.3.1, the email and the attachment arrive perfectly, and the "thank you" html page generated by the JSP displays great.

I uploaded the form and JSP page to my web server (Unix with JRUN) and now the email is not sent and I receive the following error on the top of the "thank you" page generated by the JSP:

"javax.mail.SendFailedException: Sending failed; nested exception is:
javax.mail.MessagingException: IOException while sending message;
nested exception is: java.io.FileNotFoundException: C:\file.txt(No
such file or directory)"

I am assuming that there is something different about the way my web server handles file attachments but I can't find any information about how to fix the problem. Any help is greatly appreciated.


10-19-2002, 01:11 PM
That seems fairly simple...


is a local file on your machine... you probably need to reference the (existing) file on your server the same way you would another .jsp page or directory, for example.

10-24-2002, 08:42 PM
I think that's the problem too, but I don't know where the file uploads on the server.

This worked fine when I did it from Apache loaded on my local machine. I guess because it kmew where to get the attachment file. How do I tell it where to put the file on the web server?


12-17-2002, 09:35 PM

10-07-2005, 04:57 AM
I want send message with files.
How are you attachment files?
Tell me about your solutions.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum