修复不能发邮件的错误
This commit is contained in:
parent
2b369ef8c2
commit
2c474145f5
|
@ -239,14 +239,15 @@ class ReviewListener implements Zend_EventManager_ListenerAggregate
|
|||
$this->db->query($sql,array($id));
|
||||
//email message
|
||||
if(isset($emails) &&is_array($emails) && count($emails)>0)
|
||||
{
|
||||
$mail=new WestdcMailer($this->view->config->smtp);
|
||||
{
|
||||
$config=Zend_Registry::get('config');
|
||||
$mail=new WestdcMailer($config->smtp);
|
||||
$sql="select m.uuid,m.title from metadata m left join mdstatus s on m.uuid=s.uuid where s.id='$id'";
|
||||
$rs=$this->db->query($sql);
|
||||
$res=$rs->fetch();
|
||||
$mailtp=new EmailText($this->db,'metadata-publish',array('uuid'=>$res['uuid'],'title'=>$res['title']));
|
||||
$mail->setBodyText($mailtp->getBody());
|
||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||
$mail->setBodyText($mailtp->getBody());
|
||||
$mail->setFrom($config->service->email,'西部数据中心服务组');
|
||||
foreach($emails as $email) $mail->addTo($email);
|
||||
$mail->setSubject($mailtp->getSubject());
|
||||
$mail->send();
|
||||
|
|
Loading…
Reference in New Issue