Ticket system rework of the recipients, cc organisation, mail display and more

This commit is contained in:
Xenomporio
2022-08-01 22:55:52 +02:00
parent 6e7e27d289
commit 3238206446
6 changed files with 129 additions and 44 deletions
@@ -527,6 +527,9 @@ class TicketImportHelper
SET ticketnachricht='$ticketnachricht'
WHERE id='$id' LIMIT 1"
);
// Add all the ccs to the header table
if (is_array($cc_recv)) {
foreach ($cc_recv as $mail) {
if ($mail['name'] != '') {
@@ -548,6 +551,22 @@ class TicketImportHelper
}
$cc_recv = [];
}
// Add all the recipients to the header table
if (count($message->getRecipients()) > 1) {
foreach ($message->getRecipients() as $recipient) {
$recipient_address = $this->db->real_escape_string($recipient->getEmail());
if ($recipient_address != '') {
$sql = "INSERT INTO ticket_header
(`id`,`ticket_nachricht`,`type`,`value`)
VALUES
('', '$ticketnachricht', 'to', '" . $recipient_address . "')";
$this->db->InsertWithoutLog($sql);
}
}
}
}
// Prüfen ob Ordner vorhanden ansonsten anlegen