If your issue is resolved, you can ignore this email - the ticket will automatically close. If you need further assistance, please respond to this email.
This is a notification that a new ticket has been raised in ITFlow. Client: $client_name Priority: Low (email parsed) Link: https://$config_base_url/ticket.php?ticket_id=$id
--------------------------------
$subject $details";
$data[] = [
@@ -209,7 +209,7 @@ function addReply($from_email, $date, $subject, $ticket_number, $message, $attac
// Add email as a comment/reply to an existing ticket
// Access global variables
- global $mysqli, $company_name, $company_phone, $config_ticket_prefix, $config_base_url, $config_ticket_from_name, $config_ticket_from_email, $config_smtp_host, $config_smtp_port, $config_smtp_encryption, $config_smtp_username, $config_smtp_password, $allowed_extensions;
+ global $mysqli, $config_app_name, $company_name, $company_phone, $config_ticket_prefix, $config_base_url, $config_ticket_from_name, $config_ticket_from_email, $config_smtp_host, $config_smtp_port, $config_smtp_encryption, $config_smtp_username, $config_smtp_password, $allowed_extensions;
// Set default reply type
$ticket_reply_type = 'Client';
@@ -221,19 +221,22 @@ function addReply($from_email, $date, $subject, $ticket_number, $message, $attac
$message = mysqli_escape_string($mysqli, "Email from: $from_email at $date:-
$message");
// Lookup the ticket ID
- $row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT ticket_id, ticket_subject, ticket_status, ticket_contact_id, ticket_client_id, contact_email
+ $row = mysqli_fetch_array(mysqli_query($mysqli, "SELECT ticket_id, ticket_subject, ticket_status, ticket_contact_id, ticket_client_id, contact_email, client_name
FROM tickets
LEFT JOIN contacts on tickets.ticket_contact_id = contacts.contact_id
+ LEFT JOIN clients on tickets.ticket_client_id = clients.client_id
WHERE ticket_number = $ticket_number LIMIT 1"));
if ($row) {
// Get ticket details
$ticket_id = intval($row['ticket_id']);
+ $ticket_subject = sanitizeInput($row['ticket_subject']);
$ticket_status = sanitizeInput($row['ticket_status']);
$ticket_reply_contact = intval($row['ticket_contact_id']);
$ticket_contact_email = sanitizeInput($row['contact_email']);
$client_id = intval($row['ticket_client_id']);
+ $client_name = sanitizeInput($row['client_name']);
// Check ticket isn't closed - tickets can't be re-opened
if ($ticket_status == "Closed") {
@@ -241,7 +244,7 @@ function addReply($from_email, $date, $subject, $ticket_number, $message, $attac
$email_subject = "Action required: This ticket is already closed";
$email_body = "Hi there,
You\'ve tried to reply to a ticket that is closed - we won\'t see your response.
Please raise a new ticket by sending a fresh e-mail to our support address below.