Just a short question regarding Mail_Imap: Is there any easy way to download
the attachments instead of displaying them in HTML?
Sorry for the belated reply.
If I understand your question correctly, if you want to force download of an attachment use header() to initiate the necessary changes.
For instance, in place of the IMAP.message.php example file in the package, you could replace the code in that file with something like this:
<?php
// snip connection stuff here
$body = $msg->getBody($_GET['mid'], $_GET['pid']);
header('Content-Type: '.$body['ftype']);
header('Content-Disposition: attachment; filename='.$body['fname']);
echo $body['message'];
?>
This will present the user with a "save as" dialouge.
HTH!
Regards,
Richard York
--
:::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
:::::::::::::::::::::::::::::::::::::::::