Using Zend mail in custom programs
I tried include only zend mail part in my program and entire zf is not included.Is it possible to use particular components of zf rather using entire zend.How can 开发者_开发问答i include only zend mail in my program?
Yes it is possible.
There is a project at http://epic.codeutopia.net/pack/ that allows you to download a zip file of the specific components you need. However, it is limited in selection of versions.
You can also manually extract the files you need from a downloaded copy of the framework. You must make sure that you get all the dependencies. The components are supposed to have very low dependency on others so you shouldn't need the entire MVC stack, for example, just to use the Zend_Mail component. You might, however, have to grab Zend_Exception, but I'm not sure.
After you get the source, you will just include it like any other script. In your case it might look as follows.
<?php
require_once "/path/to/Zend/Mail.php";
$mailer = new Zend_Mail();
//code
精彩评论