Contact alternate email (DB 4.4.1): one more address per contact in the contact window under Email, shown on their page, quick look and the Reach column, searched by the contacts, clients, tickets and global searches, exported and imported as Alternate Email and in the API as contact_email_alt, and recognized on incoming email as theirs - a new ticket as them at their client even with unknown senders off, and their reply by ticket number, conversation or subject - with the ticket's from line showing the address it came from while everything ITFlow sends still goes to their Email and neither address is copied in; the duplicate warning, Try an Email, Unprocessed Email and the ignored sender and routing rule warnings count it too, and the same-as-Email warning shows while typing (contactEmailSql(), contactHasEmail(), contactEmailMatchSql()); 26.12.4 changelog

This commit is contained in:
johnnyq
2026-12-02 13:36:49 -05:00
parent 8dae372d57
commit 2ad57e2865
31 changed files with 276 additions and 80 deletions

View File

@@ -0,0 +1,20 @@
<?php
/*
* ITFlow - Database update to version 4.4.1 (from 4.4.0)
* Included by admin/database_updates.php - do not access directly
*
* contacts.contact_email_alt - a contact's alternate email address, beside contact_email: shown and searched with it,
* exported, imported and in the API, and email from it is the contact's - their new tickets and their replies
* (contactEmailSql(), functions/contact.php). What ITFlow sends goes to contact_email alone.
*
* Re-runnable: the column is made only where it isn't there.
*/
defined('FROM_DB_UPDATER') || die("Direct file access is not allowed");
$itflow_email_alt = mysqli_query($mysqli, "SELECT 1 FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'contacts' AND COLUMN_NAME = 'contact_email_alt' LIMIT 1");
if (!$itflow_email_alt || mysqli_num_rows($itflow_email_alt) === 0) {
mysqli_query($mysqli, "ALTER TABLE `contacts` ADD `contact_email_alt` varchar(200) DEFAULT NULL AFTER `contact_email`");
}