From 48b74d77a0c39bcb3399ce6603e1ad424f01fc3e Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 7 Jun 2020 10:45:40 +0200 Subject: [PATCH] [Web] Fix PHPMailer, minor style change for quarantine rcpts --- data/web/inc/ajax/qitem_details.php | 4 ++-- data/web/inc/ajax/transport_check.php | 3 +++ data/web/inc/functions.inc.php | 3 +++ data/web/js/site/qhandler.js | 2 +- data/web/js/site/quarantine.js | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/data/web/inc/ajax/qitem_details.php b/data/web/inc/ajax/qitem_details.php index 4a61232c..0ea89047 100644 --- a/data/web/inc/ajax/qitem_details.php +++ b/data/web/inc/ajax/qitem_details.php @@ -53,7 +53,7 @@ if (!empty($_GET['hash']) && ctype_alnum($_GET['hash'])) { addAddresses($recipientsList, $mail_parser, 'to'); addAddresses($recipientsList, $mail_parser, 'cc'); addAddresses($recipientsList, $mail_parser, 'bcc'); - $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'SMTP'); + $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'smtp'); $data['recipients'] = $recipientsList; } // Get from @@ -108,7 +108,7 @@ elseif (!empty($_GET['id']) && ctype_alnum($_GET['id'])) { addAddresses($recipientsList, $mail_parser, 'to'); addAddresses($recipientsList, $mail_parser, 'cc'); addAddresses($recipientsList, $mail_parser, 'bcc'); - $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'SMTP'); + $recipientsList[] = array('address' => $mailc['rcpt'], 'type' => 'smtp'); $data['recipients'] = $recipientsList; } // Get from diff --git a/data/web/inc/ajax/transport_check.php b/data/web/inc/ajax/transport_check.php index 3526e81b..b249e555 100644 --- a/data/web/inc/ajax/transport_check.php +++ b/data/web/inc/ajax/transport_check.php @@ -1,6 +1,9 @@ '); - elem.text(value.address + (value.type != 'to' ? (' (' + value.type.toUpperCase() + ')') : '')); + elem.text(value.address + ' (' + value.type.toUpperCase() + ')'); $('#qid_detail_recipients').append(elem); }); } diff --git a/data/web/js/site/quarantine.js b/data/web/js/site/quarantine.js index af871dec..a4606645 100644 --- a/data/web/js/site/quarantine.js +++ b/data/web/js/site/quarantine.js @@ -174,7 +174,7 @@ jQuery(function($){ if (typeof data.recipients !== 'undefined') { $.each(data.recipients, function(index, value) { var elem = $(''); - elem.text(value.address + (value.type != 'to' ? (' (' + value.type.toUpperCase() + ')') : '')); + elem.text(value.address + ' (' + value.type.toUpperCase() + ')'); $('#qid_detail_recipients').append(elem); }); }