Methods

decode a quoted printable encoded string

decodeQuotedPrintable(string $string) : string

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) : string | array

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, string $firstName) : string | array

Parameters

$field

string

header field

$wantedPart

string

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

$firstName

string

key name for the first part

Exceptions

\Zend\Mime\Exception\RuntimeException

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 | \Zend\Mail\Headers $message, \Zend\Mail\Headers $headers, string $body, string $EOL, bool $strict) : null

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

Parameters

$message

string\Zend\Mail\Headers

raw message with header and optional content

$headers

\Zend\Mail\Headers

output param, headers container

$body

string

output param, content of message

$EOL

string

EOL string; defaults to {@link Zend\Mime\Mime::LINEEND}

$strict

bool

enable strict mode for parsing message

Returns

null

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

splitMessageStruct(string $message, string $boundary, string $EOL) : array | null

Parameters

$message

string

raw message content

$boundary

string

boundary as found in content-type

$EOL

string

EOL string; defaults to {@link Zend\Mime\Mime::LINEEND}

Exceptions

\Zend\Mime\Exception\RuntimeException

Returns

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

Explode MIME multipart string into separate parts

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

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\Mime\Exception\RuntimeException

Returns

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