实现后台评审中外审数据的版本发布邮件给专家功能

This commit is contained in:
wlx 2013-04-22 16:04:49 +00:00
parent b10488a813
commit a9c8c62e59
1 changed files with 7 additions and 5 deletions

View File

@ -2381,10 +2381,12 @@ class Admin_DataController extends Zend_Controller_Action
}
@$mail->send();
//email to experts, sync to database?
//todo!!!
//should generate new pdf? or user could not commit a new version when it is in the reviewing process?
/*
//email to experts
$sql="select u.username,u.email from mdexpertreview e left join users u on e.id=u.id where e.status in (0,1) and e.uuid=?";
$sth = $this->db->prepare($sql);
$sth->execute(array($row['uuid']));
$experts = $sth->fetch();
unset($mail);
unset($mailtp);
$mail=new WestdcMailer($this->view->config->smtp);
@ -2404,7 +2406,7 @@ class Admin_DataController extends Zend_Controller_Action
$mail->createAttachment($filecontent,'application/octet-stream',Zend_Mime::DISPOSITION_ATTACHMENT, Zend_Mime::ENCODING_BASE64, $row['title'].'.pdf');
if($this->debug==0)
{
$mail->addTo($user->email);
foreach ($experts as $expert) $mail->addTo($expert['email']);
$mail->addCc($this->view->config->service->email);
}else{
$mail->addTo($this->debug_email);