JavaMail - outofmemory error on sending large attachment

Hi,I am using the JavaMail api to send an email with some HTML content and an attachment. However, when the dataset is large, about 1500 rows, I get the java.lang.OutOfMemory error. How can I send large attachments with JavaMail?Thanks.
[264 byte] By [ane09a] at [2007-11-26 19:15:52]
# 1
what would be the size of that attachment..?
mshanua at 2007-7-9 21:28:12 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
How are you creating the HTML content for the dataset?If it's too large to keep in memory, you might consider writingit to a file and attaching it to the message using FileDataSource.
bshannona at 2007-7-9 21:28:13 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...