Using Zend Framework from Yii
Yii provides many excellent solutions with which you can build an application. Still, you probably will need more. One of the best places to look is Zend Framework classes. These are of high quality and solve many tasks, such as using Google APIs or working with e-mails.
In this recipe, we will see how to use the Zend_Mail package to send e-mails from the Yii application. We will use both a simple approach of using the whole framework and will also implement a custom autoloader that will allow us to use only Zend_Mail and its dependencies.
Getting ready
Before we begin this recipe, we need to have a few things in place.
Create a fresh application by using
yiic webapp.Download the Zend Framework 1 code (the minimal version is enough) from the following URL:
http://framework.zend.com/downloads/latest
In this recipe, we have used Version 1.11.6.
Extract
library/Zendfrom the downloaded archive toprotected/vendors/Zend.
How to do it...
Carry out the following steps:
We...