category Zend
package Zend_Mime
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

decode a quoted printable encoded string

decodeQuotedPrintable(string $string) : string
Static

The charset of the returned string depends on your iconv settings.

Parameters

$string

string

Encoded string

Returns

stringDecoded string

split a content type in its different parts

splitContentType(string $type, string $wantedPart = null) : string | array
Static

Parameters

$type

string

content-type

$wantedPart

string

the wanted part, else an array with all parts is returned

Returns

stringarraywanted part or all parts as array('type' => content-type, partname => value)

split a header field like content type in its different parts

splitHeaderField(string $field, string $wantedPart = null, integer|string $firstName = 0) : string | array
Static

Parameters

$field

string

$wantedPart

string

the wanted part, else an array with all parts is returned

$firstName

integerstring

key name for the first part

Exceptions

\Zend_Exception

Returns

stringarraywanted part or all parts as array($firstName => firstPart, partname => value)

split a message in header and body part, if no header or an invalid header is found $headers is empty

splitMessage(string $message, array $headers, string $body, string $EOL = \Zend_Mime::LINEEND) : null
Static

The charset of the returned headers depend on your iconv settings.

Parameters

$message

string

raw message with header and optional content

$headers

array

output param, array with headers as array(name => value)

$body

string

output param, content of message

$EOL

string

EOL string; defaults to {@link Zend_Mime::LINEEND}

Returns

null

decodes a mime encoded String and returns a struct of parts with header and body

splitMessageStruct(string $message, string $boundary, string $EOL = \Zend_Mime::LINEEND) : array | null
Static

Parameters

$message

string

raw message content

$boundary

string

boundary as found in content-type

$EOL

string

EOL string; defaults to {@link Zend_Mime::LINEEND}

Exceptions

\Zend_Exception

Returns

arraynullparts as array('header' => array(name => value), 'body' => content), null if no parts found

Explode MIME multipart string into seperate parts

splitMime(string $body, string $boundary) : array
Static

Parts consist of the header and the body of each MIME part.

Parameters

$body

string

raw body of message

$boundary

string

boundary as found in content-type

Exceptions

\Zend_Exception

Returns

arrayparts with content of each part, empty if no parts found