I have a database with mail in rfc822 format, most of which are with MIME attachements. I want to create an XSP that will present the user with those messages and allow for downloading of specific attachements.
Getting the information from the database is not a problem, but what do I do when the user requests a binary attachement, such as a PDF? Is there any way to tell AxKit, "scrap this, return this scalar to the user instead of everything else. oh, and it's an application/x-pdf by the way"?
Hah, sounds very similar to MessageLabs spam quarantine system (which I wrote through most of last year, and is now live, and is all written in AxKit). Email me privately if you want help on securely escaping the email into a viewable format.
I use this in the XSP files to send raw data (not XSLT processed):
if ($cgi->param('raw')) { my $file = $db->get_spam_path($user->{email}, $id); open(my $fh, $file); $r->send_http_header('text/plain'); $r->send_fd($fh); exit(); }
(in an <xsp:logic> section).
Matt.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]