I am in deep mess....
I am new to zend and working on resitration module right now
and was tring to send an activation link mail to user on registration.....
It send values to databse but doesnt send mail
i am using this code to send mail
$tr = new Zend_Mail_Transport_Sendmail(xyz@gmail.com');
Zend_Mail::setDefaultTransport($tr);
$config = new
Zend_Config_Ini('C:/wamp/www/photoshop/application/configs/application.ini',
'production',
array('skipExtends' => true,
'allowModifications' => true));
$templateTxt=$activationLink;
$mailer = new Zend_Mail('utf-8');
$mailer->addTo($emailAddress, $name);
$mailer->setSubject('Confirm your registeration in s');
$mailer->setBodyHtml($templateTxt, 'utf8');
$mailer->setFrom($config->mail->from);
$mailer->send();
But it gives an error saying
Application error
Exception information:
Message: Unable to send mail
Stack trace:
#0 C:\wamp\www\photoshop\library\Zend\Mail\Transport\Abstract.php(348):
Zend_Mail_Transport_Sendmail->_sendMail()
#1 C:\wamp\www\photoshop\library\Zend\Mail.php(960):
Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 C:\wamp\www\photoshop\application\models\Mailer.php(55):
Zend_Mail->send()
#3 C:\wamp\www\photoshop\application\models\Users.php(36):
Default_Model_Mailer->sendRegistrationMail('kusumsouls@sify...', 'asds',
'http://localhos...')
#4 C:\wamp\www\photoshop\application\controllers\UserController.php(25):
Default_Model_Users->add('asds', '123456', 'kusumsouls@sify...', 'zdasda',
'dsdasd', 'dsdasd', '', 'sdas', 'sdasda', '03062', '1234567890')
#5 C:\wamp\www\photoshop\library\Zend\Controller\Action.php(512):
UserController->registerAction()
#6
C:\wamp\www\photoshop\library\Zend\Controller\Dispatcher\Standard.php(288):
Zend_Controller_Action->dispatch('registerAction')
#7 C:\wamp\www\photoshop\library\Zend\Controller\Front.php(936):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http))
#8
C:\wamp\www\photoshop\library\Zend\Application\Bootstrap\Bootstrap.php(77):
Zend_Controller_Front->dispatch()
#9 C:\wamp\www\photoshop\library\Zend\Application.php(303):
Zend_Application_Bootstrap_Bootstrap->run()
#10 C:\wamp\www\photoshop\public\index.php(25): Zend_Application->run()
I am not getting the possible cause of error and so stuck badly...
Please help if someone has a clue to this....
Thanks and Regards
Kusum
--
View this message in context: http://www.nabble.com/Unable-to-send-Mail-tp24904424p24904424.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论