php - Zend mail is not working in live site -
i using below mentioned script send emails in zend (version 1.12) project suggested on http://framework.zend.com/manual/1.12/en/zend.mail.smtp-authentication.html .
$admin_email ='admin@test.com'; $subject = "subject"; $mail_body = "mail body"; $mail_config = array('auth' => 'login', 'username' => 'abc@abc.com', 'password' => 'password'); $transport = new zend_mail_transport_smtp('smtp.server.com', $mail_config); $mail = new zend_mail('utf-8'); $mail->setbodyhtml($mail_body); $mail->setfrom($admin_email); $mail->addto($admin_email); $mail->setsubject($subject); $mail->send($transport); the above code working fine in local test site. but, not working in live site (i.e instead of sending mail, aborting execution of further action process). tried other smtp information did not work in live site.
checked post problem when sending mail zend mail? well, , included below code not solve issue.
require_once('zend/mail/transport/smtp.php'); require_once 'zend/mail.php';
Comments
Post a Comment