Mail_mimeDecode - Example

Mail_mimeDecode - Example -- decode an email

ðÒÉÍÅÒ

Пример 47-1. 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);

?>

HIVE: All information for read only. Please respect copyright!
Hosted by hive ÊÃÁ: Êèåâñêàÿ ãîðîäñêàÿ áèáëèîòåêà