I'm working on a set of email components for Cocoon (mostly finished), and there's one part I'd appreciate comments or advice on.
A MIME message can contain a number of parts of different types (including binary attachments), and these have to be extracted from the message. Currently I've written a MailSource which includes binary MIME parts, like this: <mail:message> ... <mail:part type="multipart/related"> ... <mail:part type="image/jpeg" id="002101c22de7$6e1a2e20$0100007f@x7g1x4" file-name="hottype_chomsky911.jpg" size="18014" encoding="base64"> (based64-encoded data here) </mail:part> ... </mail:part> </mail:message> This is currently useless ;-) because you can't do anything with the base-64 encoded data, but I'm planning to write a MimePartSerializer that will decode the binary data, and could even add "disposition" etc. headers to the HTTP response. Does this seem like a reasonable idea? The other option I considered was to produce only a reference in my <mail:message> document, e.g. <mail:part type="image/jpeg" id="002101c22de7$6e1a2e20$0100007f@x7g1x4" file-name="hottype_chomsky911.jpg" size="18014" encoding="base64"/> (NB mail:part element is empty, but @id is a unique reference) Then I could access the binary parts in a separate pipeline using a MimePartSource that referred to a part within a message. I think the first option is simpler, but maybe there's some other approach I haven't considered? Any thoughts? Cheers Con --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]