mirror of
https://github.com/itflow-org/itflow
synced 2026-11-22 04:17:24 +00:00
Mail queue keeps what a sent email said: only an email with a link or code that opens something - a shared login and its code, a portal or agent invite, a password link, a contract to sign or a task to approve - is cleared once sent, and a day after it was queued if it failed or was cancelled; emailQueue gains a sensitive option set by those senders, cron marks sent email with mailQueueSentSql, nightly runs mailQueueClearSensitive, and a cleared email can't be retried; database 3.7.1 adds email_queue.email_sensitive and marks email waiting at the update; 26.11.9 changelog entries
This commit is contained in:
@@ -343,6 +343,9 @@ function emailPlainText($html, $limit = 0) {
|
||||
* ticket_reply_id the agent's ticket reply it carries - kept with each email
|
||||
* (email_queue.email_ticket_reply_id), so the conversation says who
|
||||
* it went to and whether it went (ticketReplyEmailed())
|
||||
* sensitive it carries a link or code that opens something - a shared login, an
|
||||
* invite, a password link, a signing or approval link - so the mail queue
|
||||
* clears what it said once it has gone (email_queue.email_sensitive)
|
||||
* Who it was queued to, "Name (email)". Nothing is queued without mail set up.
|
||||
*/
|
||||
function emailQueue(array $recipients, $subject, array $email, array $opts = []) {
|
||||
@@ -380,7 +383,8 @@ function emailQueue(array $recipients, $subject, array $email, array $opts = [])
|
||||
'attachments' => $attachments,
|
||||
] + (!empty($opts['cal_str']) ? ['cal_str' => (string) $opts['cal_str']] : [])
|
||||
+ ($queued_at !== '' ? ['queued_at' => $queued_at] : [])
|
||||
+ (intval($opts['ticket_reply_id'] ?? 0) > 0 && ticketReplyEmailReady() ? ['ticket_reply_id' => intval($opts['ticket_reply_id'])] : []);
|
||||
+ (intval($opts['ticket_reply_id'] ?? 0) > 0 && ticketReplyEmailReady() ? ['ticket_reply_id' => intval($opts['ticket_reply_id'])] : [])
|
||||
+ (!empty($opts['sensitive']) ? ['sensitive' => 1] : []);
|
||||
}
|
||||
if ($data) {
|
||||
addToMailQueue($data);
|
||||
|
||||
Reference in New Issue
Block a user