Emailing Large Attachments
<p>Are there any packages available that will efficiently send emails with large attachments (each file is capped at 10mb, but could include multiple files).  If not, any suggestions on an appropriate design that wouldn't result in out of memory exceptions causing issues across applications deployed on the same server?</p>

<p>Files are delivered to the application server by ftp.  Once transmission is complete, a web service is invoked (metadata for the transaction).  Based on business rules, this service may need need to email the files.</p>

<p>My initial thoughts were a putting the request on a message queue (so the service can return immediately), and having a synchronized method process the request (so multiple requests at or around the same time won't blow up the heap).  </p>

<hr>

<p>updating with code</p>

<pre><code>messageBodyPart = new MimeBodyPart();
FileDataSource fileDataSource =new FileDataSource("locationTo.big.file");
messageBodyPart.setDataHandler(new DataHandler(fileDataSource));
messageBodyPart.setFileName("big.file");
multipart.addBodyPart(messageBodyPart);
&lt;rinse..repeat&gt;

message.setContent(multipart);

Transport.send(msg);
</code></pre>

<p>If I attach 5 10mb attachments, 50mb won't be eaten up by the heap all at once?</p>
