Error with Javamail attachments
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.
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.
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?
I want send message with files.
How are you attachment files?
Tell me about your solutions.
|All times are GMT +1. The time now is 11:45 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.