1176. Class

1176.1. Zend\Mime\Message

1176.1.1. Methods

1176.1.1.1. getParts

getParts()

Returns the list of all Zend_Mime_Parts in the message

Return type:array of ZendMimePart

1176.1.1.2. setParts

setParts()

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

Parameters:array

1176.1.1.3. addPart

addPart()

Append a new Zend_Mime_Part to the current message

Parameters:ZendMimePart

1176.1.1.4. isMultiPart

isMultiPart()

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

Return type:bool

1176.1.1.5. setMime

setMime()

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:ZendMimeMime

1176.1.1.6. getMime

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.

Return type:ZendMimeMime

1176.1.1.7. generateMessage

generateMessage()

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 separated by the mime boundary as defined in Zend_Mime. If {@link 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 – EOL string; defaults to {@link Zend_Mime::LINEEND}
Return type:string

1176.1.1.8. getPartHeadersArray

getPartHeadersArray()

Get the headers of a given part as an array

Parameters:int
Return type:array

1176.1.1.9. getPartHeaders

getPartHeaders()

Get the headers of a given part as a string

Parameters:
  • int
  • string
Return type:

string

1176.1.1.10. getPartContent

getPartContent()

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

Parameters:
  • int
  • string
Return type:

string

1176.1.1.11. _disassembleMime

_disassembleMime()

Explode MIME multipart string into separate parts

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

Parameters:
  • string
  • string
Throws ExceptionRuntimeException:
 
Return type:

array

1176.1.1.12. createFromMessage

createFromMessage()

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
  • string
  • string – EOL string; defaults to {@link Zend_Mime::LINEEND}
Throws ExceptionRuntimeException:
 
Return type:

ZendMimeMessage