| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <sect1 id="zend.mime.message">
- <title>Zend_Mime_Message</title>
- <sect2 id="zend.mime.message.introduction">
- <title>Introduction</title>
- <para>
- <classname>Zend_Mime_Message</classname> represents a <acronym>MIME</acronym> compliant
- message that can contain one or more separate Parts (Represented as <link
- linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link> objects). With
- <classname>Zend_Mime_Message</classname>, <acronym>MIME</acronym> compliant multipart
- messages can be generated from <classname>Zend_Mime_Part</classname> objects. Encoding
- and Boundary handling are handled transparently by the class.
- <classname>Zend_Mime_Message</classname> objects can also be reconstructed from given
- strings (experimental). Used by <link
- linkend="zend.mail"><classname>Zend_Mail</classname></link>.
- </para>
- </sect2>
- <sect2 id="zend.mime.message.instantiation">
- <title>Instantiation</title>
- <para>
- There is no explicit constructor for <classname>Zend_Mime_Message</classname>.
- </para>
- </sect2>
- <sect2 id="zend.mime.message.addparts">
- <title>Adding MIME Parts</title>
- <para>
- <link linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link>
- Objects can be added to a given <classname>Zend_Mime_Message</classname> object by
- calling <methodname>addPart($part)</methodname>
- </para>
- <para>
- An array with all <link
- linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link>
- objects in the <classname>Zend_Mime_Message</classname> is returned from the method
- <methodname>getParts()</methodname>. The <classname>Zend_Mime_Part</classname>
- objects can then be changed since they are stored in the array as references. If
- parts are added to the array or the sequence is changed, the array needs
- to be given back to the <link
- linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link>
- object by calling <methodname>setParts($partsArray)</methodname>.
- </para>
- <para>
- The function <methodname>isMultiPart()</methodname> will return
- <constant>TRUE</constant> if more than one part is registered with the
- <classname>Zend_Mime_Message</classname> object and thus the object would generate a
- Multipart-Mime-Message when generating the actual output.
- </para>
- </sect2>
- <sect2 id="zend.mime.message.bondary">
- <title>Boundary handling</title>
- <para>
- <classname>Zend_Mime_Message</classname> usually creates and uses its own
- <classname>Zend_Mime</classname> Object to generate a boundary. If you need to define
- the boundary or want to change the behaviour of the <classname>Zend_Mime</classname>
- object used by <classname>Zend_Mime_Message</classname>, you can instantiate the
- <classname>Zend_Mime</classname> object yourself and then register it to
- <classname>Zend_Mime_Message</classname>. Usually you will not need to do this.
- <methodname>setMime(Zend_Mime $mime)</methodname> sets a special instance of
- <classname>Zend_Mime</classname> to be used by this
- <classname>Zend_Mime_Message</classname>
- </para>
- <para>
- <methodname>getMime()</methodname> returns the instance of
- <classname>Zend_Mime</classname> that will be used to render the message when
- <methodname>generateMessage()</methodname> is called.
- </para>
- <para>
- <methodname>generateMessage()</methodname> renders the
- <classname>Zend_Mime_Message</classname> content to a string.
- </para>
- </sect2>
- <sect2 id="zend.mime.message.parse">
- <title>parsing a string to create a Zend_Mime_Message object (experimental)</title>
- <para>
- A given <acronym>MIME</acronym> compliant message in string form can be used to
- reconstruct a <classname>Zend_Mime_Message</classname> Object from it.
- <classname>Zend_Mime_Message</classname> has a static factory Method to parse this
- String and return a <classname>Zend_Mime_Message</classname> Object.
- </para>
- <para>
- <methodname>Zend_Mime_Message::createFromMessage($str, $boundary)</methodname>
- decodes the given string and returns a <classname>Zend_Mime_Message</classname>
- Object that can then be examined using <methodname>getParts()</methodname>
- </para>
- </sect2>
- </sect1>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|