Zend_Mime_Message.xml 4.8 KB

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