Mail review stage 2: the mail queue sends at most config_mail_send_per_minute a minute (database 4.2.9, Admin > Settings > Mail, Sending) over one connection with bulk email last, retries over about eight hours on a growing wait, stops for the minute when the server turns two away in a row, costs no email a try when the server can't be reached, doesn't retry an address turned away for good and marks its contact Email bounced, sends an email once when only someone copied in is turned away, tells admins once an hour at most instead of every agent per email, and gives each email a plain text part and ITFlow's own host name; 26.12.3 changelog

This commit is contained in:
johnnyq
2026-11-30 16:50:04 -05:00
parent a9e5bc66db
commit 899f2259fe
12 changed files with 488 additions and 320 deletions

View File

@@ -0,0 +1,28 @@
<?php
/*
* ITFlow - Database update to version 4.2.9 (from 4.2.8)
* Included by admin/database_updates.php - do not access directly
*
* The mail queue goes at a pace the mail host takes, and ticket email goes before bulk email:
* settings.config_mail_send_per_minute - the most emails sent a minute (Admin > Settings > Mail,
* Sending), 30 to start - what Microsoft 365 takes from one mailbox
* email_queue.email_bulk - 1 for an email from the contacts or clients list (Email), which waits
* behind everything else
*
* Re-runnable: each column is added only where it isn't there.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
$itflow_pace_columns = [
['settings', 'config_mail_send_per_minute', "int(11) NOT NULL DEFAULT 30 AFTER `config_smtp_password`"],
['email_queue', 'email_bulk', "tinyint(1) NOT NULL DEFAULT 0 AFTER `email_sensitive`"],
];
foreach ($itflow_pace_columns as [$itflow_table, $itflow_column, $itflow_definition]) {
$itflow_column_exists = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = '$itflow_table' AND COLUMN_NAME = '$itflow_column' LIMIT 1");
if (!$itflow_column_exists || mysqli_num_rows($itflow_column_exists) === 0) {
mysqli_query($mysqli, "ALTER TABLE `$itflow_table` ADD `$itflow_column` $itflow_definition");
}
}