Mail review stage 8: Admin > Ignored Senders lists addresses and domains whose email the ticket mailbox sets aside with no ticket, reply, answer or Unprocessed Email entry, a domain taking its subdomains, each counting what it set aside and saving one that takes a contact's or client's email saying so; Ignore Sender in Unprocessed Email ignores the address or its domain and dismisses the others waiting, leaving contacts, client domains and public domains to an admin; Try an Email has the step; every queued email gets its own Message-ID and invoice and quote emails say what they are about, so a bounce marks the email it came back about as Bounced with the mail server's reason in a new Mail Queue tab, on the ticket reply for those it names and in the invoice or quote history, matched by address and subject when the report has no Message-ID; .gitignore leaves out uploads/mail_unprocessed and uploads/kb (database 4.3.5); 26.12.3 changelog

This commit is contained in:
johnnyq
2026-12-01 00:06:27 -05:00
parent 812c4ae9c2
commit d2d9732efb
31 changed files with 878 additions and 26 deletions

View File

@@ -0,0 +1,58 @@
<?php
/*
* ITFlow - Database update to version 4.3.5 (from 4.3.4)
* Included by admin/database_updates.php - do not access directly
*
* email_ignored_senders - addresses and domains whose email the ticket mailbox sets aside (functions/mail_ignore.php),
* with why, who added each, and how many emails it set aside and when the last was
* email_queue.email_message_id - each email's own Message-ID, so a bounce finds the email it was about
* email_queue.email_about - what a billing email was about - invoice:12, quote:7 - for its history when it bounces
* email_queue.email_bounced_at, email_bounce - when a sent email bounced, and for whom, with what the mail server said
* ({"address": "why"})
* The Message-IDs of the email already in the queue are filled in from its headers, where it kept them.
*
* Re-runnable: the table and each column are made only where they aren't there, and only empty Message-IDs filled in.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
mysqli_query($mysqli, "CREATE TABLE IF NOT EXISTS `email_ignored_senders` (
`ignored_sender_id` int(11) NOT NULL AUTO_INCREMENT,
`ignored_sender_match` varchar(255) NOT NULL,
`ignored_sender_note` varchar(255) NOT NULL DEFAULT '',
`ignored_sender_matches` int(11) NOT NULL DEFAULT 0,
`ignored_sender_matched_at` datetime DEFAULT NULL,
`ignored_sender_created_by` int(11) NOT NULL DEFAULT 0,
`ignored_sender_created_at` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`ignored_sender_id`),
UNIQUE KEY `ignored_sender_match` (`ignored_sender_match`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci");
$itflow_queue_columns = [
['email_message_id', "varchar(255) DEFAULT NULL AFTER `email_headers`"],
['email_about', "varchar(50) DEFAULT NULL AFTER `email_message_id`"],
['email_bounced_at', "datetime DEFAULT NULL AFTER `email_sent_at`"],
['email_bounce', "text DEFAULT NULL AFTER `email_bounced_at`"],
];
foreach ($itflow_queue_columns as [$itflow_column, $itflow_definition]) {
$itflow_column_exists = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'email_queue' AND COLUMN_NAME = '$itflow_column' LIMIT 1");
if (!$itflow_column_exists || mysqli_num_rows($itflow_column_exists) === 0) {
mysqli_query($mysqli, "ALTER TABLE `email_queue` ADD `$itflow_column` $itflow_definition");
}
}
$itflow_index_exists = mysqli_query($mysqli, "SELECT 1 FROM information_schema.STATISTICS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'email_queue' AND INDEX_NAME = 'email_message_id' LIMIT 1");
if (!$itflow_index_exists || mysqli_num_rows($itflow_index_exists) === 0) {
mysqli_query($mysqli, "ALTER TABLE `email_queue` ADD KEY `email_message_id` (`email_message_id`)");
}
// The Message-IDs the queue kept in the headers of a ticket's email
$itflow_queue_sql = mysqli_query($mysqli, "SELECT email_id, email_headers FROM email_queue WHERE email_message_id IS NULL AND email_headers LIKE '%Message-ID%'");
while ($itflow_queue_sql && ($itflow_queue_row = mysqli_fetch_assoc($itflow_queue_sql))) {
$itflow_message_id = trim((string) (json_decode((string) $itflow_queue_row['email_headers'], true)['Message-ID'] ?? ''), "<> \t");
if ($itflow_message_id !== '' && strlen($itflow_message_id) <= 255) {
mysqli_query($mysqli, "UPDATE email_queue SET email_message_id = '" . mysqli_real_escape_string($mysqli, $itflow_message_id) . "' WHERE email_id = " . intval($itflow_queue_row['email_id']));
}
}

View File

@@ -0,0 +1,136 @@
<?php
/*
* Admin > Ignored Senders - addresses and domains whose email the ticket mailbox sets aside (functions/mail_ignore.php):
* no ticket, no reply on one, no answer, no Unprocessed Email entry. Each with why, who added it, and how many emails it
* set aside and the last. New and edit in modals/email_ignored_sender/email_ignored_sender.php; the handlers are
* admin/post/email_ignored_sender.php. Unprocessed Email's Ignore Sender adds them too.
*/
// Default Column Sortby Filter
$sort = "ignored_sender_match";
$order = "ASC";
require_once "includes/inc_all_admin.php";
if (!mailIgnoreReady()) { ?>
<div class="alert alert-warning">Ignored senders need the database update - <a href="update.php" class="alert-link">Maintenance &gt; Update</a>.</div>
<?php require_once "../includes/footer.php";
return;
}
// Only these sort - an unknown column would take the page down
$sortable_columns = [
'ignored_sender_match' => "ignored_sender_match $order",
'ignored_sender_matches' => "ignored_sender_matches $order, ignored_sender_match ASC",
'ignored_sender_matched_at' => "ignored_sender_matched_at IS NULL, ignored_sender_matched_at $order, ignored_sender_match ASC",
'ignored_sender_created_at' => "ignored_sender_created_at $order, ignored_sender_match ASC",
];
if (!isset($sortable_columns[$sort])) {
$sort = 'ignored_sender_match';
}
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS email_ignored_senders.*, user_name FROM email_ignored_senders
LEFT JOIN users ON user_id = ignored_sender_created_by
WHERE (ignored_sender_match LIKE '%$q%' OR ignored_sender_note LIKE '%$q%')
ORDER BY {$sortable_columns[$sort]}
LIMIT $record_from, $record_to");
$num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<div class="card" data-ignored-senders>
<div class="card-header bg-dark py-2">
<h3 class="card-title mt-2"><i class="fas fa-fw fa-eye-slash me-2"></i>Ignored Senders</h3>
<div class="card-tools">
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/email_ignored_sender/email_ignored_sender.php">
<i class="fas fa-plus"></i><span class="d-none d-lg-inline ms-2">New Ignored Sender</span>
</button>
</div>
</div>
<div class="card-header py-3">
<p class="small text-body-secondary mb-3">
Email from these addresses and domains is set aside by the ticket mailbox: no ticket, no reply on one, and no answer - it is moved to the mailbox's
ITFlow folder like the rest. A domain takes its subdomains too. A mail server's bounce is still read, and an email an agent makes a ticket from in
<a href="/agent/email_unprocessed.php">Unprocessed Email</a> goes where they say.
</p>
<form autocomplete="off">
<div class="row g-2 align-items-center">
<div class="col-lg-5 col-md-6">
<div class="input-group">
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(escapeHtml($q)); } ?>" placeholder="Search ignored senders..." title="An address, a domain, or why">
<button class="btn btn-dark" title="Search"><i class="fas fa-search"></i></button>
</div>
</div>
</div>
</form>
</div>
<div>
<div class="table-responsive">
<table class="table table-hover align-middle mb-0">
<thead class="table-light text-nowrap <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th class="ps-3"><?= sortLink('ignored_sender_match', 'Sender') ?></th>
<th class="d-none d-md-table-cell">Why</th>
<th><?= sortLink('ignored_sender_matches', 'Set aside') ?></th>
<th class="d-none d-lg-table-cell"><?= sortLink('ignored_sender_matched_at', 'Last') ?></th>
<th class="d-none d-lg-table-cell"><?= sortLink('ignored_sender_created_at', 'Added') ?></th>
<th></th>
</tr>
</thead>
<tbody>
<?php while ($row = mysqli_fetch_assoc($sql)) {
$id = intval($row['ignored_sender_id']);
$match = (string) $row['ignored_sender_match'];
$domain = strpos($match, '@') === false;
$edit = 'data-modal-url="modals/email_ignored_sender/email_ignored_sender.php?id=' . $id . '"';
?>
<tr data-ignored-sender="<?= escapeHtml($match) ?>">
<td class="ps-3 min-w-0">
<a class="ajax-modal fw-semibold text-body text-break" href="#" <?= $edit ?>><?= escapeHtml($domain ? "@$match" : $match) ?></a>
<div class="small text-body-secondary"><?= $domain ? 'Everyone at this domain, and its subdomains' : 'This address' ?></div>
<?php if (trim((string) $row['ignored_sender_note']) !== '') { ?>
<div class="small text-body-secondary d-md-none text-break"><?= escapeHtml($row['ignored_sender_note']) ?></div>
<?php } ?>
</td>
<td class="d-none d-md-table-cell small text-break"><?= trim((string) $row['ignored_sender_note']) !== '' ? escapeHtml($row['ignored_sender_note']) : '<span class="text-body-tertiary">-</span>' ?></td>
<td data-ignored-count><?= number_format(intval($row['ignored_sender_matches'])) ?> <span class="small text-body-secondary">email<?= intval($row['ignored_sender_matches']) === 1 ? '' : 's' ?></span></td>
<td class="d-none d-lg-table-cell small text-nowrap text-body-secondary"><?= $row['ignored_sender_matched_at'] ? escapeHtml(timeAgo($row['ignored_sender_matched_at'])) : 'Never' ?></td>
<td class="d-none d-lg-table-cell small text-nowrap text-body-secondary">
<?= escapeHtml(date('M j, Y', strtotime((string) $row['ignored_sender_created_at']))) ?>
<?php if ($row['user_name'] !== null) { ?><div><?= escapeHtml($row['user_name']) ?></div><?php } ?>
</td>
<td class="text-end pe-3">
<div class="dropdown dropstart">
<button class="btn btn-sm btn-light" title="More actions" type="button" data-bs-toggle="dropdown"><i class="fas fa-fw fa-ellipsis-v"></i></button>
<div class="dropdown-menu">
<a class="dropdown-item ajax-modal" href="#" <?= $edit ?>><i class="fas fa-fw fa-edit text-secondary me-2"></i>Edit</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item text-danger confirm-link" href="post.php?delete_ignored_sender=<?= $id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" data-ignored-delete>
<i class="fas fa-fw fa-trash me-2"></i>Stop Ignoring
</a>
</div>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<?php
$empty_state = [
'thing' => 'ignored senders',
'icon' => 'fa-eye-slash',
'text' => 'Add an address or a domain whose email should never become a ticket - newsletters, spam that gets through, a noisy system.',
'actions' => [['label' => 'New Ignored Sender', 'modal' => 'modals/email_ignored_sender/email_ignored_sender.php']],
];
require_once "../includes/filter_footer.php";
?>
</div>
<?php
require_once "../includes/footer.php";

View File

@@ -103,6 +103,14 @@
</a>
</li>
<?php } ?>
<?php if ($config_module_enable_ticketing && mailIgnoreReady()) { ?>
<li class="nav-item">
<a href="/admin/email_ignored_senders.php" class="nav-link <?= (basename($_SERVER['PHP_SELF']) == 'email_ignored_senders.php' ? 'active' : '') ?>">
<i class="nav-icon fas fa-eye-slash"></i>
<p>Ignored Senders</p>
</a>
</li>
<?php } ?>
<li class="nav-item">
<a href="/admin/agent_banners.php" class="nav-link <?= (basename($_SERVER['PHP_SELF']) == 'agent_banners.php' ? 'active' : '') ?>">
<i class="nav-icon fas fa-bullhorn"></i>

View File

@@ -3,7 +3,8 @@
/*
* Maintenance > Mail Queue - every email ITFlow sends, from being queued to
* sent, and what came of it (functions/mail_queue.php says what each status
* is). The tabs pick Waiting, Sending, Retrying, Failed, Sent or Cancelled,
* is). The tabs pick Waiting, Sending, Retrying, Failed, Sent, Bounced (sent, then a mail
* server's bounce for it came back - mailQueueBounced()) or Cancelled,
* each with how many; at the top, anything stopping the queue moving -
* sending switched off, cron not running, the job off, or email waiting
* longer than it should. An email can be retried from the start, cancelled
@@ -39,7 +40,7 @@ $search = "(email_id LIKE '%$q%' OR email_from LIKE '%$q%' OR email_from_name LI
AND DATE(email_queued_at) BETWEEN '$dtf' AND '$dtt'";
$sql = mysqli_query($mysqli, "SELECT SQL_CALC_FOUND_ROWS email_id, email_status, email_attempts, email_from, email_from_name, email_recipient, email_recipient_name, " . (ticketMailThreadReady() ? 'email_cc' : "'' AS email_cc") . ",
email_subject, email_queued_at, email_failed_at, email_sent_at, " . mailQueueErrorColumn() . ", email_attachments, COALESCE(email_cal_str, '') <> '' AS has_invite, email_content = '' AS email_cleared
email_subject, email_queued_at, email_failed_at, email_sent_at, " . mailQueueErrorColumn() . ", email_attachments, COALESCE(email_cal_str, '') <> '' AS has_invite, email_content = '' AS email_cleared" . mailQueueBounceColumns() . "
FROM email_queue
WHERE $search AND {$tabs[$show][2]}
ORDER BY {$sortable_columns[$sort]}, email_id DESC
@@ -144,7 +145,7 @@ $filtered_dates = isset($_GET['dtf']) && $_GET['dtf'] !== '' && $_GET['dtf'] !==
<?php foreach ($tabs as $key => [$label, $icon]) {
$alert = '';
if ($show !== $key && $counts[$key]) {
$alert = ['failed' => 'text-bg-danger', 'retrying' => 'text-bg-warning'][$key] ?? '';
$alert = ['failed' => 'text-bg-danger', 'retrying' => 'text-bg-warning', 'bounced' => 'text-bg-danger'][$key] ?? '';
} ?>
<a class="nav-link text-nowrap <?= $show === $key ? 'active' : '' ?>" href="<?= escapeHtml($pill_url($key)) ?>" data-mail-queue-tab="<?= $key === '' ? 'all' : $key ?>">
<i class="fas fa-fw <?= $icon ?> me-1"></i><?= $label ?> <span class="badge rounded-pill ms-1 <?= $alert ?>"><?= $counts[$key] ?></span>

View File

@@ -0,0 +1,68 @@
<?php
/*
* New Ignored Sender, and Edit - an address or a domain whose email the ticket mailbox sets aside
* (functions/mail_ignore.php), and why. One that takes contacts' or a client's email says so here, and again on saving.
* Saved by add_ignored_sender and edit_ignored_sender (admin/post/email_ignored_sender.php).
*/
require_once '../../includes/modal_header.php';
if (!mailIgnoreReady()) {
echo json_encode(['error' => 'Ignored senders need the database update.']);
exit;
}
$id = intval($_GET['id'] ?? 0);
$row = $id ? mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT * FROM email_ignored_senders WHERE ignored_sender_id = $id")) : null;
if ($id && !$row) {
echo json_encode(['error' => "That ignored sender isn't there any more."]);
exit;
}
$match = (string) ($row['ignored_sender_match'] ?? '');
$reach = $row ? mailIgnoreReachText(mailIgnoreReach($match)) : '';
ob_start();
?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-eye-slash me-2"></i><?= $row ? 'Ignored Sender' : 'New Ignored Sender' ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="post.php" method="post" autocomplete="off">
<input type="hidden" name="csrf_token" value="<?= $_SESSION['csrf_token'] ?>">
<?php if ($row) { ?><input type="hidden" name="ignored_sender_id" value="<?= $id ?>"><?php } ?>
<div class="modal-body">
<?php if ($reach !== '') { ?>
<div class="alert alert-warning small py-2" data-ignored-reach><i class="fas fa-fw fa-exclamation-triangle me-1"></i><?= $reach ?></div>
<?php } ?>
<div class="mb-3">
<label class="form-label" for="ignoredSenderMatch">Address or domain <strong class="text-danger">*</strong></label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-at"></i></span>
<input type="text" class="form-control" id="ignoredSenderMatch" name="ignored_sender_match" maxlength="255" required
value="<?= escapeHtml($match) ?>" placeholder="alerts@vendor.example, or vendor.example" <?= $row ? '' : 'autofocus' ?>>
</div>
<div class="form-text">An address sets aside only its email. A domain - <code>vendor.example</code> - sets aside everyone there, and at its subdomains.</div>
</div>
<div class="mb-3">
<label class="form-label" for="ignoredSenderNote">Why</label>
<div class="input-group">
<span class="input-group-text"><i class="fas fa-fw fa-sticky-note"></i></span>
<input type="text" class="form-control" id="ignoredSenderNote" name="ignored_sender_note" maxlength="255"
value="<?= escapeHtml($row['ignored_sender_note'] ?? '') ?>" placeholder="Newsletter, spam, a noisy system">
</div>
</div>
</div>
<div class="modal-footer">
<button type="submit" name="<?= $row ? 'edit_ignored_sender' : 'add_ignored_sender' ?>" class="btn btn-primary fw-bold"><i class="fas fa-check me-2"></i><?= $row ? 'Save' : 'Ignore' ?></button>
<button type="button" class="btn btn-light" data-bs-dismiss="modal"><i class="fas fa-times me-2"></i>Cancel</button>
</div>
</form>
<?php
require_once '../../../includes/modal_footer.php';

View File

@@ -15,7 +15,7 @@ require_once '../../includes/modal_header.php';
$email_id = intval($_GET['id'] ?? 0);
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT email_id, email_status, email_attempts, email_from, email_from_name, email_recipient, email_recipient_name, " . (ticketMailThreadReady() ? 'email_cc' : "'' AS email_cc") . ",
email_subject, email_content, email_content = '' AS email_cleared, email_cal_str, email_attachments, email_queued_at, email_failed_at, email_sent_at, " . mailQueueErrorColumn() . "
email_subject, email_content, email_content = '' AS email_cleared, email_cal_str, email_attachments, email_queued_at, email_failed_at, email_sent_at, " . mailQueueErrorColumn() . mailQueueBounceColumns() . "
FROM email_queue WHERE email_id = $email_id LIMIT 1"));
ob_start();
@@ -75,11 +75,11 @@ if (!$row) { ?>
</div>
<?php if ($state['error'] !== '') { ?>
<div class="alert <?= $state['key'] === 'cancelled' ? 'alert-secondary' : ($state['key'] === 'failed' ? 'alert-danger' : 'alert-warning') ?> py-2" data-email-error>
<div class="alert <?= $state['key'] === 'cancelled' ? 'alert-secondary' : (in_array($state['key'], ['failed', 'bounced'], true) ? 'alert-danger' : 'alert-warning') ?> py-2" data-email-error>
<?php if ($state['key'] === 'cancelled') { ?>
<i class="fas fa-fw fa-ban me-1"></i><?= escapeHtml($state['error']) ?>
<?php } else { ?>
<div class="small fw-semibold mb-1"><i class="fas fa-fw fa-exclamation-triangle me-1"></i>Why it failed</div>
<div class="small fw-semibold mb-1"><i class="fas fa-fw fa-exclamation-triangle me-1"></i><?= $state['key'] === 'bounced' ? 'It went, but came back - the mail server said' : 'Why it failed' ?></div>
<div class="small text-break font-monospace"><?= escapeHtml($state['error']) ?></div>
<?php } ?>
</div>

View File

@@ -0,0 +1,67 @@
<?php
/*
* Admin > Ignored Senders (admin/email_ignored_senders.php, functions/mail_ignore.php): add_ignored_sender and
* edit_ignored_sender keep an address or a domain whose email the ticket mailbox sets aside, and why - an address or
* domain that isn't one, or one there already, comes back saying so; delete_ignored_sender stops ignoring it. One
* that takes contacts' or a client's email is saved, saying so.
*/
defined('FROM_POST_HANDLER') || die("Direct file access is not allowed");
if (isset($_POST['add_ignored_sender']) || isset($_POST['edit_ignored_sender'])) {
validateCSRFToken();
if (!mailIgnoreReady()) {
flashAlert("Ignored senders need the database update", 'error');
redirect('email_ignored_senders.php');
}
$editing = isset($_POST['edit_ignored_sender']);
$id = $editing ? intval($_POST['ignored_sender_id'] ?? 0) : 0;
$rule = mailIgnoreClean($_POST['ignored_sender_match'] ?? '');
$note = mb_substr(trim((string) ($_POST['ignored_sender_note'] ?? '')), 0, 255);
if (!$rule) {
flashAlert("<strong>" . escapeHtml(trim((string) ($_POST['ignored_sender_match'] ?? ''))) . "</strong> isn't an email address or a domain", 'error');
redirect();
}
$match_sql = escapeSql($rule['match']);
if (mysqli_num_rows(mysqli_query($mysqli, "SELECT 1 FROM email_ignored_senders WHERE ignored_sender_match = '$match_sql' AND ignored_sender_id <> $id"))) {
flashAlert("<strong>" . escapeHtml($rule['match']) . "</strong> is ignored already", 'error');
redirect();
}
if ($editing) {
mysqli_query($mysqli, "UPDATE email_ignored_senders SET ignored_sender_match = '$match_sql', ignored_sender_note = '" . escapeSql($note) . "' WHERE ignored_sender_id = $id");
} else {
$id = mailIgnoreAdd($rule, $note, $session_user_id);
}
$reach = mailIgnoreReachText(mailIgnoreReach($rule['match']));
logAudit("Settings", $editing ? "Edit" : "Create", "$session_name set email from $match_sql to be ignored");
flashAlert("Email from <strong>" . escapeHtml($rule['kind'] === 'domain' ? '@' . $rule['match'] : $rule['match']) . "</strong> is set aside from now on" . ($reach !== '' ? " - $reach" : ''), $reach !== '' ? 'warning' : 'success');
redirect();
}
if (isset($_GET['delete_ignored_sender'])) {
validateCSRFToken();
$id = intval($_GET['delete_ignored_sender']);
$match = (string) (mysqli_fetch_row(mysqli_query($mysqli, "SELECT ignored_sender_match FROM email_ignored_senders WHERE ignored_sender_id = $id"))[0] ?? '');
if ($match === '') {
flashAlert("That ignored sender isn't there any more", 'error');
redirect();
}
mysqli_query($mysqli, "DELETE FROM email_ignored_senders WHERE ignored_sender_id = $id");
logAudit("Settings", "Delete", "$session_name stopped ignoring email from " . escapeSql($match));
flashAlert("Email from <strong>" . escapeHtml($match) . "</strong> is read as usual again", 'error');
redirect();
}

View File

@@ -39,6 +39,13 @@ echo settingsPageStart('ticket');
<button type="button" class="btn btn-sm btn-outline-secondary ajax-modal" data-modal-url="modals/ticket_mail/ticket_mail_try.php" data-ticket-mail-try><i class="fas fa-vial me-2"></i>Try an Email</button>
<span class="small text-body-secondary">What an email from someone would become - a reply, a ticket, or kept for your team to sort - and why. Uses the saved settings.</span>
</div>
<?php if (mailIgnoreReady()) {
$ignored_count = count(mailIgnoreRules()); ?>
<div class="d-flex flex-wrap align-items-center gap-2 mt-2" data-ignored-senders-link>
<a class="btn btn-sm btn-outline-secondary" href="email_ignored_senders.php"><i class="fas fa-eye-slash me-2"></i>Ignored Senders<?= $ignored_count ? " ($ignored_count)" : '' ?></a>
<span class="small text-body-secondary">Addresses and domains whose email is set aside - no ticket, and no answer.</span>
</div>
<?php } ?>
</div>
<?= settingsSectionEnd() ?>