Zend_Mime_Message.xml 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.mime.message">
  4. <title>Zend_Mime_Message</title>
  5. <sect2 id="zend.mime.message.introduction">
  6. <title>Introduction</title>
  7. <para><classname>Zend_Mime_Message</classname> represents a MIME compliant message
  8. that can contain one or more separate Parts (Represented as <link
  9. linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link> objects). With
  10. <classname>Zend_Mime_Message</classname>, MIME compliant multipart messages can be generated from
  11. <classname>Zend_Mime_Part</classname> objects. Encoding and Boundary handling are handled transparently
  12. by the class. <classname>Zend_Mime_Message</classname> objects can also be reconstructed from given
  13. strings (experimental). Used by <link linkend="zend.mail"><classname>Zend_Mail</classname></link>.
  14. </para>
  15. </sect2>
  16. <sect2 id="zend.mime.message.instantiation">
  17. <title>Instantiation</title>
  18. <para>
  19. There is no explicit constructor for <classname>Zend_Mime_Message</classname>.
  20. </para>
  21. </sect2>
  22. <sect2 id="zend.mime.message.addparts">
  23. <title>Adding MIME Parts</title>
  24. <para><link linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link>
  25. Objects can be added to a given <classname>Zend_Mime_Message</classname> object by calling
  26. <code>-&gt;addPart($part)</code></para>
  27. <para>An array with all <link linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link>
  28. objects in the <classname>Zend_Mime_Message</classname> is returned
  29. from the method <code>-&gt;getParts()</code>. The Zend_Mime_Part objects
  30. can then be changed since they are stored in the array as references. If
  31. parts are added to the array or the sequence is changed, the array needs
  32. to be given back to the <link linkend="zend.mime.part"><classname>Zend_Mime_Part</classname></link>
  33. object by calling <code>-&gt;setParts($partsArray)</code>.</para>
  34. <para>The function <code>-&gt;isMultiPart()</code> will return true if
  35. more than one part is registered with the <classname>Zend_Mime_Message</classname> object and thus
  36. the object would generate a Multipart-Mime-Message when generating the
  37. actual output.</para>
  38. </sect2>
  39. <sect2 id="zend.mime.message.bondary">
  40. <title>Boundary handling</title>
  41. <para><classname>Zend_Mime_Message</classname> usually creates and uses its own
  42. <classname>Zend_Mime</classname> Object to generate a boundary. If you need to
  43. define the boundary or want to change the behaviour of the <classname>Zend_Mime</classname> object
  44. used by <classname>Zend_Mime_Message</classname>, you can instantiate the <classname>Zend_Mime</classname>
  45. object yourself and then register it to <classname>Zend_Mime_Message</classname>.
  46. Usually you will not need to do this. <code>-&gt;setMime(Zend_Mime
  47. $mime)</code> sets a special instance of <classname>Zend_Mime</classname> to be used
  48. by this <classname>Zend_Mime_Message</classname></para>
  49. <para><code>-&gt;getMime()</code> returns the instance of
  50. <classname>Zend_Mime</classname> that will be used to render the message when
  51. <code>generateMessage()</code> is called.</para>
  52. <para><code>-&gt;generateMessage()</code> renders the <classname>Zend_Mime_Message</classname>
  53. content to a string.</para>
  54. </sect2>
  55. <sect2 id="zend.mime.message.parse">
  56. <title>parsing a string to create a Zend_Mime_Message object
  57. (experimental)</title>
  58. <para>A given MIME compliant message in string form can be used to
  59. reconstruct a <classname>Zend_Mime_Message</classname> Object from it.
  60. <classname>Zend_Mime_Message</classname> has a static factory Method to parse this
  61. String and return a <classname>Zend_Mime_Message</classname> Object.</para>
  62. <para><classname>Zend_Mime_Message::createFromMessage($str, $boundary)</classname>
  63. decodes the given string and returns a <classname>Zend_Mime_Message</classname>
  64. Object that can then be examined using <code>-&gt;getParts()</code></para>
  65. </sect2>
  66. </sect1>
  67. <!--
  68. vim:se ts=4 sw=4 et:
  69. -->