Settings > Tickets, filled in for this * ticket, to change before it goes - it goes on the ticket as a public note * and, with client emails on, to the contact and watchers in place of the * usual "resolved" words. Closing it later asks them nothing. * resolve_ticket_no_response (agent/post/ticket.php). ?ticket_id= */ require_once '../../../includes/modal_header.php'; enforceUserPermission('module_support', 2); $row = ticketForModal($_GET['ticket_id'] ?? 0, 2, true); $ticket_id = intval($row['ticket_id']); // Who it goes to - as the Resolve button's own email $watcher_count = intval(mysqli_fetch_row(mysqli_query($mysqli, "SELECT COUNT(*) FROM ticket_watchers WHERE watcher_ticket_id = $ticket_id"))[0] ?? 0); $contact_email = trim((string) ($row['contact_email'] ?? '')); $emailed_to = []; if ($contact_email !== '') { $emailed_to[] = trim((string) $row['contact_name']) !== '' ? (string) $row['contact_name'] : $contact_email; } if ($watcher_count) { $emailed_to[] = $watcher_count . ' watcher' . ($watcher_count === 1 ? '' : 's'); } if (!emailReady()) { $why_not = 'mail isn\'t set up'; } elseif (intval($config_ticket_client_general_notifications) !== 1) { $why_not = 'client emails are off'; } elseif (!$emailed_to) { $why_not = 'there\'s no contact or watcher with an email address'; } else { $why_not = ''; } ob_start(); ?>