1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
<?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:
-->
|