From: Marc G. K. <ma...@sq...> - 2003-04-12 15:40:50
|
Jonathan Angliss zei: > Hello Brian, > On Saturday, April 12, 2003, Brian G. Peterson wrote... > >> How would we set the correct mime type for the message body from a >> plugin? > > You'd have to alter the code slightly, and use a hook at the same > time. The current code doesn't allow for provisions in using a > different mime type, so you have to alter the source to do so. You > might want to take a look at the HTMLArea plugin, and see how that > does it, as that does just that. The only alteration you'd require is > where the instructions tell you to change a line to be: > > $content_type = 'plain/$email_type'; > > To be: > > $content_type = 'plain/' . $email_type; > > Or even in your case as your altering multiple parts, probably: > > $content_type = $email_type; > > Hope that gives you a starting point. > Ehm, when we introduced the deliver class the goal was that we could feed it a message object. The message object represents the mimestructure of a message. ( a tree containing message objects). The message object contains the rfc822Header object representing the rfc822 header and / or the mime header object representing the mimeHeader. The trick is to manipulate the message object tree and their content before you hand it over to the deliver class. (adding mimeparts => make sure you set the main content-type to multipart/xxxxx) I don't know if there is a hook available where that could be done but if there is that's the location to do complex mime stuff. See the class/mime directory how the different classes are related. Regards, Marc Groot Koerkamp (AKNA stekkel) |