Utility class used for creating wrapped or MIME-encoded versions of header values.

package Default

 Methods

Test if is possible apply MIME-encoding

canBeEncoded(string $value) : boolean
Static

Parameters

$value

string

Returns

boolean

MIME-decode a value

mimeDecodeValue(string $value) : string
Static

Performs quoted-printable decoding on a value.

Parameters

$value

string

Returns

stringReturns the mime encode value without the last line ending

MIME-encode a value

mimeEncodeValue(string $value, string $encoding, integer $lineLength = 998) : string
Static

Performs quoted-printable encoding on a value, setting maximum line-length to 998.

Parameters

$value

string

$encoding

string

$lineLength

integer

maximum line-length, by default 998

Returns

stringReturns the mime encode value without the last line ending

Wrap a long header line

wrap(string $value, \Zend\Mail\Header\HeaderInterface $header) : string
Static

Parameters

$value

string

$header

\Zend\Mail\Header\HeaderInterface

Returns

string

Wrap a structured header line

wrapStructuredHeader(string $value, \Zend\Mail\Header\StructuredInterface $header) : string
Static

Parameters

$value

string

$header

\Zend\Mail\Header\StructuredInterface

Returns

string

Wrap an unstructured header line

wrapUnstructuredHeader(string $value, \Zend\Mail\Header\HeaderInterface $header) : string
Static

Wrap at 78 characters or before, based on whitespace.

Parameters

$value

string

$header

\Zend\Mail\Header\HeaderInterface

Returns

string