Comunitatea PHP Romania
 

 
Mail_mimeDecode::decode()

Mail_mimeDecode::decode()

Mail_mimeDecode::decode() -- perform decoding

Description

This function performs the decoding and returns a structure containing the message data.

Parameter

  • array $args - an array with the function arguments

    • boolean $args['include_bodies'] - whether to include the bodies in the returned structure.

    • boolean $args['decode_bodies'] - whether to decode the returned bodies.

    • boolean $args['decode_headers'] - whether to decode the headers (RFC2047).

    • string $args['input'] - if and only if called statically, this should be used to specify the input to be decoded.

    • string $args['crlf'] - if and only if called statically, this should be used to specify the line ending type.

Return value

object -

  • array $return->headers - an associative array of the headers. The keys of the array are the header names (lowercased) whilst the values are the header values (original case). If there are multiple headers with the same name (eg. Received: ) then the value is a numerically indexed array of each of the header values. If the parameter decode_headers is specified as TRUE, the headers will be decoded according to RFC 2047.

  • string $return->ctype_primary - the first part of the content type (ie. before the forward slash). Eg. if the content type is multipart/mixed, ctype_primary would be "multipart".

  • string $return->ctype_secondary - the second part of the content type. Eg. If the content type is multipart/mixed, ctype_secondary would be "mixed".

  • array $return->ctype_parameters - if the content type header has any parameters (eg. boundary="=_hudfhdsalfhds8fy8329hfj") then they will be in this associative array. Keys are the parameter name (eg. boundary) whilst the values are the parameter values (eg. =_hudfhdsalfhds8fy8329hfj).

  • string $return->disposition - if the Content-Disposition header is present, its value will be given here. This is usually either "inline" or "attachment".

  • array $return->d_parameters - if any parameters are given with the Content-Disposition header, they will be given here in an associative array, keys being the parameter names and values being the parameter values. "name" and "filename" are two common examples here.

  • array $return->body - if the include_bodies parameter is given when instanciating the class, (either statically or via a concrete instance), then this will be present if the part in question has a body. MIME parts with content type multipart/* generally do not not have bodies, instead consisting of subparts. If the parameter decode_bodies is specified as TRUE then the body will be decoded.

  • array $return->parts - if a MIME part consists of subparts, then this array will be present consisting of objects with the same properties as described here.

Note

This function can be called statically.

Ultimele discutii in forum RSS Forum

Ultimele articole Ultimele articole

Top membri

Pirahna Pirahna
la birou
carco carco
Bucuresti
Birkoff Birkoff
Bucuresti
mihaitha mihaitha
Sibiu
Mascka Mascka
Braila
gabysolomon gabysolomon
Bacau
whooper whooper
Toronto ON
raul_ raul_
dechim dechim
Drobeta Turnu Severin
Amenthes Amenthes

Newsletter


Email:
 inscriere
 renuntare
 
 Arhiva newsletter

Parteneriat

Copyright © 2001-2008 PHP Romania Add PHPRomania to Google Add PHPRomania to Del.icio.us Add PHPRomania to Stumbleupon Add PHPRomania to Yahoo! Add PHPRomania to Digg Add PHPRomania to Blink Debt Consolidation | Loans | Loans | Verizon Ringtones | Worms For Fishing Bait UK
Ads: Partener Way2Web Nework: gazduire web | inregistrare domenii | web design | imobiliare | web hosting
Powered by Simplis