Skip to content

Instantly share code, notes, and snippets.

@dangvanduc90
Created January 23, 2019 16:52
Show Gist options
  • Save dangvanduc90/9b430e28568956e013eca7e12995e75b to your computer and use it in GitHub Desktop.
Save dangvanduc90/9b430e28568956e013eca7e12995e75b to your computer and use it in GitHub Desktop.
if($id){
$reference = getUser($id);
if($reference && isset($reference['email']) && $reference['email']){
$ref_name = isset($reference['fullname']) && $reference['fullname'] ? $reference['fullname'] : $reference['username'];
$content = 'Dear ' . $ref_name . ', <br><br>'
. 'Bạn vừa được ' . '<b>' . $owner_name . '</b> gán làm người liên quan cho ticket <b>' . $ticket['title'] . '</b> vào lúc ' . date('d/m/Y H:i:s', strtotime($ticket['created_date'])) . '<br>'
. 'Click vào link bên dưới để theo dõi công việc.<br>'
. '<a href="http://' . getenv('EXTERNAL_URL') . '/instance/ticket/view/' . $ticket['id'] . '/' . $ticket['business_id'] . '">'
. 'http://' . getenv('EXTERNAL_URL') . '/instance/ticket/view/' . $ticket['id'] . '/' . $ticket['business_id'] . '</a><br><br>'
. 'Ticket Platform';
sendEmail($reference, $ticket['title'], $content, $ticket['id']);
} else {
$log = array(
'reference_user_id' => $id,
'reference_user' => $reference,
'line' => __FILE__.' - Line: '.__LINE__,
'time' => date('Y-m-d H:i:s', time()),
'url' => getenv('EXTERNAL_URL'),
);
createLogs($log, EXCEPTION_ROUTER);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment