Wrox Home  
Search P2P Archive for: Go

  Return to Index  

j2ee thread: Re: How to get the local file when i am sending attachment in a javamail.


Message #1 by "Kalyan Tej Musunuri" <wroxp2p@y...> on Sun, 13 May 2001 09:44:24
Hi, 

For sending the attachment through java mail the file should be on the 
server machine. For your problem you have to transfer the file from the 
client to the server. This can be done by using a multipart form and file 
control. When a file control is used and the form is posted the client 
sends the file to the server in a multipart message format that has to be 
parsed at the server side and the file has to be saved on the server. The 
you will be able to send the attachment through java mail. you can search 
for free upload java servlets as a reference. 

bye 
Kalyan Tej    

> Hi,
> I was developed a JSP mailing application by using javamail.....and kept 
> all the files in default-app directory of JRun in my PC(i.e server).I am 
> trying to send a mail including attachment from my PC then it is sending 
> properly....but whenever i am trying to access this application with 
other 
> PC which is in intranet,I am sending to,from,subject,body successfully 
but 
> whenever i am trying to send a attachment then it is giving FileNotFound 
> Exception....Bcoz it is expecting that file in server machine
> 
> So please suggest me how to access local PC file while sending 
> attachment...
> 
> regards,

  Return to Index