aspose file tools*
The moose likes Servlets and the fly likes sending attachments using javamail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "sending attachments using javamail" Watch "sending attachments using javamail" New topic
Author

sending attachments using javamail

Sree Jag
Ranch Hand

Joined: Oct 14, 2003
Posts: 77
Hi all,

I am writing an email application with attachments. i realise that we should store the file that is selected by the client on the client machine in a temporary directory on the server that is running the email application.

can somebody please tell me how to store the file on the server temporarily and delete it after sending the mail?

Thanks in advance,
Seshu


Sree Jag<br />SCJP 1.4
Vijay Vaddem
Ranch Hand

Joined: Feb 13, 2004
Posts: 243
Hi,

Hope this will be helpful.....

Cheers,

Vijay


[ July 12, 2004: Message edited by: Vijay Vaddem ]
Rovas Kram
Ranch Hand

Joined: Aug 08, 2003
Posts: 135
You don't really have to save the mime part to a file. You can write a buffered data source simply by extending the javax.activation.DataSource class.

For example

 
Don't get me started about those stupid light bulbs.
 
subject: sending attachments using javamail