1. First you have to download the Zend Framework library.
Then place it somewhere in the server with name like library and set the include_path to your working php page
Ex: set_include_path(get_include_path().PATH_SEPARATOR.realpath(realpath(dirname(__FILE__)).'/library'));
2. Include Zend_mail and Zend_Mail_Transport_Smtp file in the file/function
3. Set/Get the config variables
Use the following code.
require_once 'Zend/Mail.php';
require_once 'Zend/Mail/Transport/Smtp.php';
$config = array('auth' => 'login',
'username' => 'info@domainname',
'password' => 'password');
$transport = new Zend_Mail_Transport_Smtp('smtpServer', $config);
$mail = new Zend_Mail();
$mail->setFrom('info@domainname', 'DO NOT REPLY');
$mail->addTo($toEmail, 'Recipient');
$mail->setSubject('Set Subject');
$mail->setBodyText('Add Message');
$mail->send($transport);
Then place it somewhere in the server with name like library and set the include_path to your working php page
Ex: set_include_path(get_include_path().PATH_SEPARATOR.realpath(realpath(dirname(__FILE__)).'/library'));
2. Include Zend_mail and Zend_Mail_Transport_Smtp file in the file/function
3. Set/Get the config variables
Use the following code.
require_once 'Zend/Mail.php';
require_once 'Zend/Mail/Transport/Smtp.php';
$config = array('auth' => 'login',
'username' => 'info@domainname',
'password' => 'password');
$transport = new Zend_Mail_Transport_Smtp('smtpServer', $config);
$mail = new Zend_Mail();
$mail->setFrom('info@domainname', 'DO NOT REPLY');
$mail->addTo($toEmail, 'Recipient');
$mail->setSubject('Set Subject');
$mail->setBodyText('Add Message');
$mail->send($transport);