修复邮件发送问题
This commit is contained in:
parent
a48a75a77c
commit
79e12c9797
|
@ -627,8 +627,7 @@ class DataController extends Zend_Controller_Action
|
|||
if ($this->_request->isPost()) {
|
||||
include_once("bcspamblock.php");
|
||||
$formdata=$this->_request->getPost();
|
||||
//if (bcspamblock_verify() && $commentForm->isValid($formdata)) {
|
||||
if ( $commentForm->isValid($formdata)) {
|
||||
if (bcspamblock_verify() && $commentForm->isValid($formdata)) {
|
||||
$sql="insert into comments (userid,uuid,author,email,url,ip,content,agent,type) values(?,?,?,?,?,?,?,?,?)";
|
||||
$agent=$this->_request->getHeader('User-Agent');
|
||||
$ip=$this->_request->getServer('REMOTE_ADDR');
|
||||
|
@ -642,20 +641,13 @@ class DataController extends Zend_Controller_Action
|
|||
$patt['uuid'] = $formdata['uuid'];
|
||||
$patt['title']= $this->view->metadata->title;
|
||||
$patt['content']= $content;
|
||||
/*
|
||||
$patt = array(
|
||||
'user' =>$author,
|
||||
'uuid' =>$formdata['uuid'],
|
||||
'title' =>$this->view->metadata['title'],
|
||||
//'content' =>$content
|
||||
);*/
|
||||
$mailtp=new EmailText($this->db,"data-comments-posted",$patt);
|
||||
$mailtp=new EmailText($this->db,"data-comment-note",$patt);
|
||||
$mail=new WestdcMailer($this->view->config->smtp);
|
||||
$mail->setBodyText($mailtp->getBody());
|
||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||
$mail->addTo($this->view->config->service->email);
|
||||
$mail->setSubject($mailtp->getSubject());
|
||||
@$mail->send();
|
||||
$mail->send();
|
||||
$formdata['content']='';
|
||||
}
|
||||
} elseif ($user) {
|
||||
|
|
Loading…
Reference in New Issue