package Default

 Methods

Append a new Zend\Mime\Part to the current message

addPart(\Zend\Mime\Part $part) 

Parameters

$part

\Zend\Mime\Part

Decodes a MIME encoded string and returns a Zend\Mime\Message object with all the MIME parts set according to the given string

createFromMessage(string $message, string $boundary, string $EOL = \Zend\Mime\Mime::LINEEND) : \Zend\Mime\Message
Static

Parameters

$message

string

$boundary

string

$EOL

string

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

Exceptions

\Zend\Mime\Exception\RuntimeException

Returns

\Zend\Mime\Message

Generate MIME-compliant message from the current configuration

generateMessage(string $EOL = \Zend\Mime\Mime::LINEEND) : string

This can be a multipart message if more than one MIME part was added. If only one part is present, the content of this part is returned. If no part had been added, an empty string is returned.

Parts are separated by the mime boundary as defined in Zend\Mime\Mime. If \setMime() has been called before this method, the Zend\Mime\Mime object set by this call will be used. Otherwise, a new Zend\Mime\Mime object is generated and used.

Parameters

$EOL

string

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

Returns

string

Returns the Zend\Mime\Mime object in use by the message

getMime() : \Zend\Mime\Mime

If the object was not present, it is created and returned. Can be used to determine the boundary used in this message.

Returns

\Zend\Mime\Mime

Get the (encoded) content of a given part as a string

getPartContent(integer $partnum, string $EOL = \Zend\Mime\Mime::LINEEND) : string

Parameters

$partnum

integer

$EOL

string

Returns

string

Get the headers of a given part as a string

getPartHeaders(integer $partnum, string $EOL = \Zend\Mime\Mime::LINEEND) : string

Parameters

$partnum

integer

$EOL

string

Returns

string

Get the headers of a given part as an array

getPartHeadersArray(integer $partnum) : array

Parameters

$partnum

integer

Returns

array

Returns the list of all Zend\Mime\Part in the message

getParts() : array

Returns

arrayof \Zend\Mime\Part

Check if message needs to be sent as multipart MIME message or if it has only one part.

isMultiPart() : boolean

Returns

boolean

Set Zend\Mime\Mime object for the message

setMime(\Zend\Mime\Mime $mime) 

This can be used to set the boundary specifically or to use a subclass of Zend\Mime for generating the boundary.

Parameters

$mime

\Zend\Mime\Mime

Sets the given array of Zend\Mime\Part as the array for the message

setParts(array $parts) 

Parameters

$parts

array

Explode MIME multipart string into separate parts

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

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

Parameters

$body

string

$boundary

string

Exceptions

\Zend\Mime\Exception\RuntimeException

Returns

array

 Properties

 

$mime

$mime 

Default

null
 

$parts

$parts 

Default

array()