Hello guys,
I am having strange problem trying to send e-mail using Zend Framework.
I am using same code as suggested by Zend experts, but still not working.
Someone who works with Zend may faced the same problem, or may just know what the problem is. Most of the times, that code is being skipped as it was some commented lines: nothing happens. May just be the host wrong? Because some times I just get this message: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'Connection refused' in /data/value/www/development/test/library/Zend/Mail/Protocol/Abstract.php
Thanks to everyone!
I am having strange problem trying to send e-mail using Zend Framework.
I am using same code as suggested by Zend experts, but still not working.
Someone who works with Zend may faced the same problem, or may just know what the problem is. Most of the times, that code is being skipped as it was some commented lines: nothing happens. May just be the host wrong? Because some times I just get this message: Uncaught exception 'Zend_Mail_Protocol_Exception' with message 'Connection refused' in /data/value/www/development/test/library/Zend/Mail/Protocol/Abstract.php
PHP Code:
require_once 'Zend/Mail/Transport/Smtp.php';
$host='localhost';
$tr = new Zend_Mail_Transport_Smtp($host);
Zend_Mail::setDefaultTransport($tr);
$mail = new Zend_Mail();
$body='Test mail only!';
$mail->setFrom('mailserver@dev.al');
$mail->addTo('emailserverfeedback@dev.al');
$mail->setSubject('Test Subject');
$mail->setBodyHtml($body);
$mail->send();
Comment