Yes and no. :) You could create a new mail repository that does this kind of separation (or put it in your own API), but it's not easy. There are two challenges to the separation you suggest.
1. Multipart MIME is nestable. If you send me a message with an attachment, and then I forward it back to you, your attachment would be nested so how would you decide which to separate? What if I include an attachment as well. Then you have something like this... my message header -- my text -- my attachment -- your message header -- -- your text -- -- your attachment 2. Alternate content types Often messages will be composed of a plain text and html version of a message in addition to file attachments. It's again sometimes complicated to separate this. So, what you may want to do instead is keep the entire message structure in JDBC, but then strip out the file pieces leaving some kind of MIME content-type place holder, and store that file in your file system. But in the end, this is a lot of mime-parsing, so it's relatively inefficient (javamail was never really geared towards server-side usage like this, and nobody has the energy yet to build a separate one). Anyway, something you could do.. just not too easy. Serge Knystautas Loki Technologies - Unstoppable Websites http://www.lokitech.com/ ----- Original Message ----- From: "Chris Sereda" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 17, 2002 8:03 PM Subject: JDBC and MultiPart MIME I'm a newbie with James so I apologize for my awkward questions. Using JAMES 2.1a1 with JDBC. I am wondering if the following is possible with James: James receives a 'multipart' email, then separates the message into a text only body and a file (the multipart attachment). James stores the text body in JDBC and the file(s) in the file system. The JDBC message entry would contain a column (named multipartid) with a unique id that refers to a folder on the file system that contains the attachment(s). For example, let's say James receives a 'multipart' message to 'test@localhost', with attachment 'attach1.zip'. The text body only would be stored in the JDBC message store with a column, 'multipartid', set to '756573843784' (just examples). The attachment portion remaining would be saved as file 'attach1.zip' in directory '756573843784' of a file system store. As a result the attachments from that message are referenced by the unique id. I'm sorry if this sounds crazy but I'm going somewhere with this. A web application could be created to view the message body via JDBC. Then a URL to download the attachment would refer to '.....756573843784/attach1.zip' This would allow the attachment to be downloaded via the HTTP web server, as opposed to pulling it from JDBC as one big message body. Is any of this possible ? Thanks to [EMAIL PROTECTED] and [EMAIL PROTECTED] for their input on my previous questions, greatly appreciated. -- To unsubscribe, e-mail: <mailto:james-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:james-user-help@;jakarta.apache.org>
