* Copyright 2001 Olivier Cahagne * * See the enclosed file COPYING for license information (GPL). If you * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ require_once('modules/Webmails/MailBox.php'); if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "") { $mailbox=$_REQUEST["mailbox"]; } else { $mailbox="INBOX"; } $MailBox = new MailBox($mailbox); $mail = $MailBox->mbox; $mailid = $_REQUEST['mail']; $num = $_REQUEST['num']; $transfer = $_REQUEST['transfer']; $mime = $_REQUEST['mime']; $img = imap_fetchbody($mail,$mailid,$num); if ($transfer == 'BASE64') $img = imap_base64($img); elseif ($transfer == 'QUOTED-PRINTABLE') $img = imap_qprint($img); imap_close($mail); header('Content-type: image/'.$mime); echo $img; ?>