Skip to end of metadata
Go to start of metadata

<h1>Zend_Mail, Zend_Mime, Zend_Mail_Transport Goals</h1>
<li>API remains clean and simple</li>
<li>minimal changes to API exposed to developers</li>
<li>easy to use</li>
<li>Zend_Mail_Mime can be used independently</li>
<li>Zend_Mail_Transport_* can be used independently</li>
<li>Zend_Mail does not require the developer to use or understand the API for the two classes above</li>

<p>Like to Have:</p>
<li>common interface / API for "messaging", including support for adding transport mechanisms other than SMTP, and mail(), such as developer provided transports (e.g. web service API interfacing to an email application server, IM, SMS)</li>

<h1>Message Assembly</h1>

<p>Problem: Raw message assembly for SMTP and mail() differ, and solutions proposed require binding the classes more tightly, or moving control of the final assembly to the transport.</p>

<p>Problem: Other transports will likely place greater burden on Zend_Mail, as Zend_Mail would need to be altered to provide sufficiently detailed, structured information to assemble the raw message format native to that transport's protocol.</p>

<h2>Rationale for Placing Final Assembly of Protocol-Dependent Messages into the Transport</h2>
<p>The final, raw, assembled message data structure depends on the transport. Even 8bit encodings become quite difficult for us to create outside of the ZF transport clases, as mentioned previously, unless we bind the transport "closer" to Zend_Mail. For transports other than SMTP and mail(), the structure of the final message varies significantly from that needed by the SMTP transport. However, the data supplied by a consumer of Zend_Mail might be identical in many cases. I'm not sure how such complexity could be modularized and encapsulated, if all such raw, protocol-dependent message "assembly" logic resides within a single class, Zend_Mail.</p>

<p>However, I can imagine Zend_Mail assembling the data into a common, internal format suitable for use by transports that contain the raw, transport-dependent message format construction logic. I can even imagine a developer creating messages using Zend_Mail and then sending the same message over multiple transports, or changing one part of a message, and then sending variations of the message (i.e. standard, commonplace "mail merge") over different transports, based on user preferences settings (i.e. users of their web application).</p>

<p>I'm biased towards allowing for the possibility of adding a robust "mail merge" capability with dynamically selectable transports, and the ability to revise a message and resend over a different transport. I actually have needed this functionality previously.</p>

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.