Mail_mimeDecode - Example

Mail_mimeDecode - Example – decode an email

Example

Decode an email

<?php
require_once 'Mail/mimeDecode.php';
...
$params['include_bodies'] = true;
$params['decode_bodies']  = true;
$params['decode_headers'] = true;

$decoder = new Mail_mimeDecode($input);
$structure $decoder->decode($params);
?>

This example calls the decode function statically (ie no object, straight function call) and then passes the structure to the getXML() function.

<?php

...
$params['include_bodies'] = true;
$params['decode_bodies']  = false;
$params['decode_headers'] = true;
$params['input']          = $input;
$params['crlf']           = "\r\n";

$structure Mail_mimeDecode::decode($params);
$xml Mail_mimeDecode::getXML($structure);

?>
create XML representation of MIME parts (Previous) Mail_Queue (Next)
Last updated: Wed, 23 Jul 2014 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.