本文整理汇总了PHP中Dept::getEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Dept::getEmail方法的具体用法?PHP Dept::getEmail怎么用?PHP Dept::getEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dept
的用法示例。
在下文中一共展示了Dept::getEmail方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: close
function close()
{
$sql = 'UPDATE ' . TICKET_TABLE . ' SET status=' . db_input('closed') . ',staff_id=0,isoverdue=0,duedate=NULL,updated=NOW(),closed=NOW() ' . ' WHERE ticket_id=' . db_input($this->getId());
// NEW MOD CODE STARTS HERE
// get dept object
$dept = new Dept($this->getDeptId());
// get email object for current
$email = new Email($this->getEmail());
// see if the department ticket is configured for is setup for auto response on
// new tickets. I have some departments I don't want notification on close
// A new attribute could be used, but I piggy backed on an existing as it
// suited my needs fine for now.
if ($dept->autoRespONNewTicket()) {
// small debug message that prints at the top of ticket screen so I know
// an email was sent
print '<div id="system_notice"><b>Email enviado</b></div>';
// subject for email -- totally configurable. code in previous post was
// showing the internal ID, not the external ID a user would need
$subj = "Solicitud de soporte #" . $this->getExtId() . " cerrada";
// I added a link in the body to the ticket for the user if they wanted
// to view it just after I closed it.
$body = "El ticket #" . $this->getExtId() . " fue cerrado.\n\nPuede consultar la información sobre la consulta en:\nhttp://soporte.chilesinpapeleo.cl/view.php?e=" . $this->getEmail() . "&t=" . $this->getExtId() . "\n\nSaludos,\nMesa de soporte\nUnidad de Modernización y Gobierno Digital";
// this sends out the email ensuring the "From" address is whatever
// is configured for the department
$dept->getEmail()->send($this->getEmail(), $subj, $body);
}
// NEW MOD CODE ENDS HERE
return db_query($sql) && db_affected_rows() ? true : false;
}