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

 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::LINEEND) : \Zend_Mime_Message
Static

Parameters

$message

string

$boundary

string

$EOL

string

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

Exceptions

\Zend_Exception

Returns

\Zend_Mime_Message

Generate MIME-compliant message from the current configuration

generateMessage(string $EOL = \Zend_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 seperated by the mime boundary as defined in Zend_Mime. If \setMime() has been called before this method, the Zend_Mime object set by this call will be used. Otherwise, a new Zend_Mime object is generated and used.

Parameters

$EOL

string

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

Returns

string

Returns the Zend_Mime object in use by the message

getMime() : \Zend_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

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

getPartContent(integer $partnum, string $EOL = \Zend_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::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_Parts 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 object for the message

setMime(\Zend_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

Sets the given array of Zend_Mime_Parts as the array for the message

setParts(array $parts) 

Parameters

$parts

array

Explode MIME multipart string into seperate 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_Exception

Returns

array

 Properties

 

The Zend_Mime object for the message

$_mime : \Zend_Mime | null

Default

null
 

The Zend_Mime_Parts of the message

$_parts : array

Default

array()