<?php
/***************************************
** Filename.......: example.php
** Project........: Mime Decoder
** Last Modified..: 26 September 2001
***************************************/
/***************************************
** This script shows how to use the mime
** decoding class. All it does is take
** the input, decode it, and show it on
** screen.
***************************************/
include('./mimeDecode.php');
$filename = './example.email.txt';
$message = fread(fopen($filename, 'r'), filesize($filename));
header('Content-Type: text/plain');
header('Content-Disposition: inline; filename="stuff.txt"');
$params = array(
'input' => $message,
'crlf' => "\r\n",
'include_bodies' => TRUE,
'decode_headers' => TRUE,
'decode_bodies' => TRUE
);
print_r(Mail_mimeDecode::decode($params));
?>
|