diff --git a/application/models/data/Review.php b/application/models/data/Review.php index 3fb2ac4a..a0d23623 100644 --- a/application/models/data/Review.php +++ b/application/models/data/Review.php @@ -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();