Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sending attachments using javamail

 
Sree Jag
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vijay Vaddem
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Hope this will be helpful.....

Cheers,

Vijay


[ July 12, 2004: Message edited by: Vijay Vaddem ]
 
Rovas Kram
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic