Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Protected Attributes

Zend_Mime_Message Class Reference

Inheritance diagram for Zend_Mime_Message:
Zend_Mail

Public Member Functions

 getParts ()
 setParts ($parts)
 addPart (Zend_Mime_Part $part)
 isMultiPart ()
 setMime (Zend_Mime $mime)
 getMime ()
 generateMessage ($EOL=Zend_Mime::LINEEND)
 getPartHeadersArray ($partnum)
 getPartHeaders ($partnum, $EOL=Zend_Mime::LINEEND)
 getPartContent ($partnum, $EOL=Zend_Mime::LINEEND)

Static Public Member Functions

static createFromMessage ($message, $boundary, $EOL=Zend_Mime::LINEEND)

Static Protected Member Functions

static _disassembleMime ($body, $boundary)

Protected Attributes

 $_parts = array()
 $_mime = null

Detailed Description

Definition at line 40 of file Message.php.


Member Function Documentation

static _disassembleMime ( body,
boundary 
) [static, protected]

Explode MIME multipart string into seperate parts

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

Parameters:
string$body
string$boundary
Returns:
array

Definition at line 202 of file Message.php.

addPart ( Zend_Mime_Part part )

Append a new Zend_Mime_Part to the current message

Parameters:
Zend_Mime_Part$part

Todo:
check for duplicate object handle

Definition at line 71 of file Message.php.

static createFromMessage ( message,
boundary,
EOL = Zend_Mime::LINEEND 
) [static]

Decodes a MIME encoded string and returns a Zend_Mime_Message object with all the MIME parts set according to the given string

Parameters:
string$message
string$boundary
string$EOLEOL string; defaults to Zend_Mime::LINEEND
Returns:
Zend_Mime_Message

Todo:
check for characterset and filename

Definition at line 243 of file Message.php.

generateMessage ( EOL = Zend_Mime::LINEEND )

Generate MIME-compliant message from the current configuration

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:
string$EOLEOL string; defaults to Zend_Mime::LINEEND
Returns:
string

Definition at line 135 of file Message.php.

getMime (  )

Returns the Zend_Mime object in use by the message

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

Definition at line 111 of file Message.php.

getPartContent ( partnum,
EOL = Zend_Mime::LINEEND 
)

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

Parameters:
int$partnum
Returns:
string

Definition at line 188 of file Message.php.

getPartHeaders ( partnum,
EOL = Zend_Mime::LINEEND 
)

Get the headers of a given part as a string

Parameters:
int$partnum
Returns:
string

Definition at line 177 of file Message.php.

getPartHeadersArray ( partnum )

Get the headers of a given part as an array

Parameters:
int$partnum
Returns:
array

Definition at line 166 of file Message.php.

getParts (  )

Returns the list of all Zend_Mime_Parts in the message

Returns:
array of Zend_Mime_Part

Definition at line 51 of file Message.php.

isMultiPart (  )

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

Returns:
boolean

Definition at line 85 of file Message.php.

setMime ( Zend_Mime mime )

Set Zend_Mime object for the message

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

Parameters:
Zend_Mime$mime

Definition at line 98 of file Message.php.

setParts ( parts )

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

Parameters:
array$parts

Definition at line 61 of file Message.php.


The documentation for this class was generated from the following file: