mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 17:18:59 +00:00
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:
28
admin/database_updates/4.2.9.php
Normal file
28
admin/database_updates/4.2.9.php
Normal 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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user