<?php
/*
* This is a simple email viewer.
* make sure that $filename points to a file containing an email message and
* load this page in your browser.
* You will be able to choose a part to view.
* */

$filename = "uumsg";

/* parse the message and return a mime message resource */
$mime = mailparse_msg_parse_file($filename);
/* return an array of message parts - this contsists of the names of the parts
* only */
$struct = mailparse_msg_get_structure($mime);