mirror of
https://github.com/itflow-org/itflow
synced 2026-12-02 09:09:01 +00:00
Mail review stage 7c: emailed and texted replies wait a few seconds on the ticket page with Undo and Send now before they are posted, set in Admin > Settings > Tickets (database 4.3.3); ticket emails sent from another address than the mailbox ITFlow reads ask for replies at that mailbox with Reply-To, which can be turned off there; 26.12.3 changelog
This commit is contained in:
@@ -554,7 +554,9 @@ function emailInlineImages($html, array $ticket = []) {
|
||||
* update, which gives the queue somewhere to keep them, one each
|
||||
* thread the ticket whose conversation it is in - it gets a Message-ID of its own and
|
||||
* In-Reply-To and References naming the emails before it (ticketMailHeaders()),
|
||||
* and answering, the Message-ID of the email it answers, when it answers one
|
||||
* and answering, the Message-ID of the email it answers, when it answers one. From
|
||||
* another address than the mailbox ITFlow reads, it asks for replies there
|
||||
* (Reply-To, ticketMailReplyToRead())
|
||||
* auto replied (an automatic answer to an email) or generated (sent by ITFlow by
|
||||
* itself) - headers saying so, so it isn't answered (ticketMailAutoHeaders())
|
||||
* bulk an email to many - the contacts or clients list's Email - which the mail queue
|
||||
@@ -589,6 +591,8 @@ function emailQueue(array $recipients, $subject, array $email, array $opts = [])
|
||||
// Where the ticket's conversation stands as it is written - each email answers that
|
||||
$thread_id = intval($opts['thread'] ?? 0);
|
||||
$thread = $thread_id && ticketMailThreadReady() ? ticketMailThread($thread_id, (string) ($opts['answering'] ?? '')) : null;
|
||||
// Replies to the mailbox ITFlow reads, when it is sent from another address (functions/ticket_reply_send.php)
|
||||
$reply_to = $thread_id ? ticketMailReplyToRead((string) $from['email']) : '';
|
||||
$auto_headers = !empty($opts['auto']) ? ticketMailAutoHeaders((string) $opts['auto']) : [];
|
||||
|
||||
$sent = [];
|
||||
@@ -601,7 +605,8 @@ function emailQueue(array $recipients, $subject, array $email, array $opts = [])
|
||||
'name' => array_key_exists('greet', $recipient) ? $recipient['greet'] : $name,
|
||||
], $footnote !== null ? ['footnote' => $footnote] : [], !empty($recipient['unsubscribe']) && !$together ? ['unsubscribe' => (string) $recipient['unsubscribe']] : []));
|
||||
// Its own headers - a List-Unsubscribe for its link - with the conversation's and the automatic ones
|
||||
$headers = ($thread !== null ? ticketMailHeaders($thread_id, (string) $from['email'], $thread) : []) + $auto_headers + (!$together ? (array) ($recipient['headers'] ?? []) : []);
|
||||
$headers = ($thread !== null ? ticketMailHeaders($thread_id, (string) $from['email'], $thread) : []) + $auto_headers + (!$together ? (array) ($recipient['headers'] ?? []) : [])
|
||||
+ ($reply_to !== '' ? ['Reply-To' => $reply_to] : []);
|
||||
$went = [];
|
||||
foreach (array_merge([$recipient], $cc) as $person) {
|
||||
$went[strtolower($person['email'])] = $person['name'] !== '' ? $person['name'] . ' (' . $person['email'] . ')' : $person['email'];
|
||||
|
||||
Reference in New Issue
Block a user