Zend_Mime_Message.xml 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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 <acronym>MIME</acronym> 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>, <acronym>MIME</acronym> 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 <classname>Zend_Mime_Part</classname> 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>
  35. The function <code>-&gt;isMultiPart()</code> will return <constant>TRUE</constant> if
  36. more than one part is registered with the <classname>Zend_Mime_Message</classname>
  37. object and thus the object would generate a Multipart-Mime-Message when generating the
  38. actual output.
  39. </para>
  40. </sect2>
  41. <sect2 id="zend.mime.message.bondary">
  42. <title>Boundary handling</title>
  43. <para><classname>Zend_Mime_Message</classname> usually creates and uses its own
  44. <classname>Zend_Mime</classname> Object to generate a boundary. If you need to
  45. define the boundary or want to change the behaviour of the <classname>Zend_Mime</classname> object
  46. used by <classname>Zend_Mime_Message</classname>, you can instantiate the <classname>Zend_Mime</classname>
  47. object yourself and then register it to <classname>Zend_Mime_Message</classname>.
  48. Usually you will not need to do this. <code>-&gt;setMime(Zend_Mime
  49. $mime)</code> sets a special instance of <classname>Zend_Mime</classname> to be used
  50. by this <classname>Zend_Mime_Message</classname></para>
  51. <para><code>-&gt;getMime()</code> returns the instance of
  52. <classname>Zend_Mime</classname> that will be used to render the message when
  53. <methodname>generateMessage()</methodname> is called.</para>
  54. <para><code>-&gt;generateMessage()</code> renders the <classname>Zend_Mime_Message</classname>
  55. content to a string.</para>
  56. </sect2>
  57. <sect2 id="zend.mime.message.parse">
  58. <title>parsing a string to create a Zend_Mime_Message object
  59. (experimental)</title>
  60. <para>A given <acronym>MIME</acronym> compliant message in string form can be used to
  61. reconstruct a <classname>Zend_Mime_Message</classname> Object from it.
  62. <classname>Zend_Mime_Message</classname> has a static factory Method to parse this
  63. String and return a <classname>Zend_Mime_Message</classname> Object.</para>
  64. <para><methodname>Zend_Mime_Message::createFromMessage($str, $boundary)</methodname>
  65. decodes the given string and returns a <classname>Zend_Mime_Message</classname>
  66. Object that can then be examined using <code>-&gt;getParts()</code></para>
  67. </sect2>
  68. </sect1>
  69. <!--
  70. vim:se ts=4 sw=4 et:
  71. -->