CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Other server side languages/ issues (http://www.codingforums.com/forumdisplay.php?f=9)
-   -   Error with Javamail attachments (http://www.codingforums.com/showthread.php?t=7329)

Red_Punisher 10-03-2002 08:15 PM

Error with Javamail attachments
 
Hi,

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.

Thanks

whammy 10-19-2002 01:11 PM

That seems fairly simple...

C:\file.txt

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.

Red_Punisher 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?

Thanks

Red_Punisher 12-17-2002 09:35 PM

bttt

bacbv 10-07-2005 04:57 AM

Help me!
 
I want send message with files.
How are you attachment files?
Tell me about your solutions.
thanks!


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.