diff --git a/cron_ticket_email_parser.php b/cron_ticket_email_parser.php
index a1832206..7bc114c6 100644
--- a/cron_ticket_email_parser.php
+++ b/cron_ticket_email_parser.php
@@ -80,13 +80,7 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
$new_config_ticket_next_number = $ticket_number + 1;
mysqli_query($mysqli, "UPDATE settings SET config_ticket_next_number = $new_config_ticket_next_number WHERE company_id = 1");
- // Clean up the message
- $message = trim($message); // Remove leading/trailing whitespace
- $message = preg_replace('/\s+/', ' ', $message); // Replace multiple spaces with a single space
- $message = nl2br($message); // Convert newlines to
-
- // Wrap the message in a div with controlled line height
- $message = "Email from: $contact_email at $date:-
$message
";
+ $message = "Email from: $contact_email at $date:-
$message";
$ticket_prefix_esc = mysqli_real_escape_string($mysqli, $config_ticket_prefix);
$subject_esc = mysqli_real_escape_string($mysqli, $subject);
@@ -152,7 +146,7 @@ function addTicket($contact_id, $contact_name, $contact_email, $client_id, $date
$client_name = sanitizeInput($client_row['client_name']);
$email_subject = "$config_app_name - New Ticket - $client_name: $subject";
- $email_body = "Hello,
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
$message";
+ $email_body = "Hello,
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[] = [
'from' => $config_ticket_from_email,
@@ -174,16 +168,9 @@ function addReply($from_email, $date, $subject, $ticket_number, $message, $attac
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;
$ticket_reply_type = 'Client';
-
- // Clean up the message
- $message_parts = explode("##- Please type your reply above this line -##", $message);
- $message_body = $message_parts[0];
- $message_body = trim($message_body); // Remove leading/trailing whitespace
- $message_body = preg_replace('/\s+/', ' ', $message_body); // Replace multiple spaces with a single space
- $message_body = nl2br($message_body); // Convert newlines to
-
- // Wrap the message in a div with controlled line height
- $message = "Email from: $from_email at $date:-
$message_body
";
+ $message = explode("##- Please type your reply above this line -##", $message);
+ //$message = nl2br($message[0]);
+ $message = "Email from: $from_email at $date:-
$message";
$ticket_number_esc = intval($ticket_number);
$message_esc = mysqli_real_escape_string($mysqli, $message);
diff --git a/post/setting.php b/post/setting.php
index 2695aa1c..50aafeb1 100644
--- a/post/setting.php
+++ b/post/setting.php
@@ -196,13 +196,13 @@ if (isset($_POST['test_email_smtp'])) {
// Test IMAP
// Autoload Composer dependencies
-require_once __DIR__ . '/../plugins/php-imap/vendor/autoload.php';
+// require_once __DIR__ . '/../plugins/php-imap/vendor/autoload.php';
// Webklex PHP-IMAP
-use Webklex\PHPIMAP\ClientManager;
+//use Webklex\PHPIMAP\ClientManager;
if (isset($_POST['test_email_imap'])) {
-
+/*
validateCSRFToken($_POST['csrf_token']);
validateAdminRole();
@@ -227,11 +227,14 @@ if (isset($_POST['test_email_imap'])) {
$_SESSION['alert_type'] = "error";
$_SESSION['alert_message'] = "Test IMAP connection failed: " . $e->getMessage();
}
+*/
+ $_SESSION['alert_message'] = "Test is Work In Progress";
header("Location: " . $_SERVER["HTTP_REFERER"]);
}
+
if (isset($_POST['edit_invoice_settings'])) {
validateCSRFToken($_POST['csrf_token']);