Email Attachment

Hi All

I am creating a text file and sending it as an attachment. The text file I am creating is just for the purpose of creating attachment and I have no use after that.

Questions:

Is there a way to send email attachment without creating a physical file.

My scenario is: I have some 10 lines of text dynamically, I have to send that 10 lines of text as an email attachemnt.

Currently I have a temporary directory in which I create this file, attach this file using Java mail and send it.

I want to avoid creating the file on disk

Please let me know.

bib

[610 byte] By [bib1a] at [2007-10-2 18:59:38]
# 1
You don't need to create a file.If you have the text in a Java String, just create the MimeBodyPart forthe attachment and use the setText method to set the content. You mightwant to use setDisposition and setFileName as well.
bshannona at 2007-7-13 20:38:14 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Any place where I can get a code sample for this.Please let me know.Thanksbib
bib1a at 2007-7-13 20:38:14 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3
There's lots of code samples included with JavaMail.What exactly did you need that you didn't find there?
bshannona at 2007-7-13 20:38:14 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...