<?php include "dbx.class.php"; $dbx = new DBX ( "test.dbx" ); $messages = $dbx -> DBXParse ( ); header ( 'Content-type:message/rfc822' ); header ( 'Content-disposition:attachment;filename=message.eml'); echo $messages [ $_GET [ 'item' ] ]; ?>