Prev | Current Page 254 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

You will be sent a notification email when this issue is updated.


Thanks for helping us improve Places,


The Places Support team.


All that is needed to turn those view scripts into something we can use in our email is to have Zend_View
render them like so:
$mail->setBodyText($this->view->render('support/text-email.phtml'));
$mail->setBodyHtml($this->view->render('support/html-email.phtml'));
The following figure 9.4 shows the output of the above in the resulting emails.
Figure 9.4 Side-by-side comparison of the output of our plain text (left) and html (right) support ticket notification emails.
Clearly this is incredibly useful and simple, largely because it is the same process used for any view script
making it flexible enough to be used for anything from a lost password email to a more involved HTML
newsletter.
Having completed the final requirement of our support tracker we have now also covered the composition
and sending features of Zend_Mail. This leaves us with the final link in the email chain; reading mail and
Zend_Mail has thoughtfully provided functionality to do that.
Licensed to Menshu You
Zend Framework in Action (Ch010) Manning Publications Co. 13
9.4 Reading email
Our support tracker now has a web form as a means for issues to be recorded and the support team notified,
however it is very likely that issues will be coming from other sources such as sent or forwarded in an email.


Pages:
242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
ABBA Gry komórkowe remanent prezenty ABC