Methods

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

addPart(\Zend\Mime\Part $part) 

Parameters

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\Message

Parameters

$message

string

$boundary

string

$EOL

string

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

Exceptions

\Zend\Mime\Exception\RuntimeException

Returns

Generate MIME-compliant message from the current configuration

generateMessage(string $EOL) : 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

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

getPartContent(int $partnum, string $EOL) : string

Parameters

$partnum

int

$EOL

string

Returns

string

Get the headers of a given part as a string

getPartHeaders(int $partnum, string $EOL) : string

Parameters

$partnum

int

$EOL

string

Returns

string

Get the headers of a given part as an array

getPartHeadersArray(int $partnum) : array

Parameters

$partnum

int

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() : bool

Returns

bool

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

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

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 

 

$parts

$parts