diff --git a/CHANGELOG.md b/CHANGELOG.md index 29c73f598..a4e106be6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ This file documents all notable changes made to ITFlow. ### Upgrading to 26.12.3 -Update from Maintenance > Update as usual - this release has fourteen database changes: 4.2.2 adds a table for passkeys and a setting to turn them on or off, 4.2.3 lets a document keep the Markdown it was written in, 4.2.4 lets a ticket keep its pictures as files, 4.2.5 adds identity providers, 4.2.6 keeps each ticket's email conversation together, 4.2.7 lets a reply from a CC say who sent it, 4.2.8 renames the watchers table for CCs, 4.2.9 lets the mail queue go at a pace your mail host takes, 4.3.0 lets contacts unsubscribe from bulk email, 4.3.1 encrypts the mail passwords and tokens, 4.3.2 keeps the email the ticket mailbox couldn't take, for your team to sort, 4.3.3 adds Undo send and Reply-To for ticket emails, 4.3.4 lets the links in emails stop working once they're done with and keeps your own wording for the emails about a ticket, and 4.3.5 adds ignored senders and ties a bounce to the email that bounced. The client portal's Microsoft 365 single sign-on becomes the first identity provider, for client contacts, and keeps its redirect address, so nothing changes in Microsoft Entra. Nothing else is required: passkeys are on, and no one has one until they add it. Pictures already inside tickets move to files in the background afterwards - the new Ticket Pictures job in Maintenance > Cron does a batch a minute, so an install with years of emailed screenshots may take a while, and tickets work as usual meanwhile. A passkey is made for your ITFlow's address (the one in config.php) and only works there, over HTTPS - if you move ITFlow to a new address, everyone adds theirs again. Watchers are called CCs now. Emails about a ticket go to its contact with the CCs copied in, rather than one each - Admin > Settings > Tickets has the switch, under Emails about a ticket. On nginx, where ITFlow's .htaccess files aren't read, add `location ^~ /uploads/mail_unprocessed/ { deny all; }` beside the other private folders - it holds copies of the email kept for Unprocessed Email. Emailed and texted replies now wait 10 seconds on the ticket page, with Undo, before they go - Admin > Settings > Tickets sets how long, or turns it off. Ticket emails sent from another address than the mailbox ITFlow reads now ask for replies at that mailbox (Reply-To) - turn that off in the same place if the From address is an alias of that mailbox and you'd rather clients only saw it. The links in emails that open a ticket, an invoice or a quote without signing in now stop working 90 days after it is done - a ticket closed, an invoice paid, a quote answered or run out - so after the update, links to ones done longer ago than that no longer open them. The client portal still shows them, and Admin > Settings > Security sets how long, or keeps them working as before. +Update from Maintenance > Update as usual - this release has fourteen database changes: 4.2.2 adds a table for passkeys and a setting to turn them on or off, 4.2.3 lets a document keep the Markdown it was written in, 4.2.4 lets a ticket keep its pictures as files, 4.2.5 adds identity providers, 4.2.6 keeps each ticket's email conversation together, 4.2.7 lets a reply from a CC say who sent it, 4.2.8 renames the watchers table for CCs, 4.2.9 lets the mail queue go at a pace your mail host takes, 4.3.0 lets contacts unsubscribe from bulk email, 4.3.1 encrypts the mail passwords and tokens, 4.3.2 keeps the email the ticket mailbox took but couldn't make a ticket from, for your team to sort, 4.3.3 adds Undo send and Reply-To for ticket emails, 4.3.4 lets the links in emails stop working once they're done with and keeps your own wording for the emails about a ticket, and 4.3.5 adds ignored senders and ties a bounce to the email that bounced. The client portal's Microsoft 365 single sign-on becomes the first identity provider, for client contacts, and keeps its redirect address, so nothing changes in Microsoft Entra. Nothing else is required: passkeys are on, and no one has one until they add it. Pictures already inside tickets move to files in the background afterwards - the new Ticket Pictures job in Maintenance > Cron does a batch a minute, so an install with years of emailed screenshots may take a while, and tickets work as usual meanwhile. A passkey is made for your ITFlow's address (the one in config.php) and only works there, over HTTPS - if you move ITFlow to a new address, everyone adds theirs again. Watchers are called CCs now. Emails about a ticket go to its contact with the CCs copied in, rather than one each - Admin > Settings > Tickets has the switch, under Emails about a ticket. On nginx, where ITFlow's .htaccess files aren't read, add `location ^~ /uploads/mail_unprocessed/ { deny all; }` beside the other private folders - it holds copies of the email kept for Unprocessed Email. Emailed and texted replies now wait 10 seconds on the ticket page, with Undo, before they go - Admin > Settings > Tickets sets how long, or turns it off. Ticket emails sent from another address than the mailbox ITFlow reads now ask for replies at that mailbox (Reply-To) - turn that off in the same place if the From address is an alias of that mailbox and you'd rather clients only saw it. The links in emails that open a ticket, an invoice or a quote without signing in now stop working 90 days after it is done - a ticket closed, an invoice paid, a quote answered or run out - so after the update, links to ones done longer ago than that no longer open them. The client portal still shows them, and Admin > Settings > Security sets how long, or keeps them working as before. ### Security @@ -79,14 +79,13 @@ Update from Maintenance > Update as usual - this release has fourteen database c - Email-to-ticket and website forms: a contact form's email comes from the website (wordpress@, a no-reply address) with the visitor in Reply-To. The visitor is the one answered now, and the ticket's CC, so your replies reach them - the website was, and the visitor never heard back. It's the ticket of the client whose domain the website is on, else a ticket with no client, and the website isn't made a contact. An email whose Reply-To is someone else at the same domain is taken as theirs. Anyone else's email is from them, whatever its Reply-To says. - A client's reply on a ticket nobody is assigned goes to the new-ticket address in Admin > Settings > Tickets, or to the admins in the bell when there isn't one. It reopened the ticket, but nobody was told. - An agent who answers the client's email from their own mailbox - reply to all, with the support address copied in - has it on the ticket as their reply, not an internal note: the client has it, so it shows as emailed to them and counts as the ticket's first response, and the ticket is theirs when nobody had it, as a reply from the ticket does. Nothing more is sent. An email only to the support address is still their internal note. -- Unprocessed Email: email the ticket mailbox couldn't make a ticket from - someone who isn't a contact, at a domain no client has, while unknown senders aren't let in, or one that failed - is kept in Tickets > Unprocessed Email (in the menu beside New Ticket) and moved to the mailbox's ITFlow folder, where it used to stay in the inbox flagged and unread for someone to find. The tickets list says how many are waiting. Each shows who it is from, its subject, a line of what it says and why it wasn't taken. +- Unprocessed Email: email the ticket mailbox took but couldn't make a ticket from - the ticket couldn't be made, or the email couldn't be read - is kept in Tickets > Unprocessed Email (in the menu beside New Ticket) and moved to the mailbox's ITFlow folder, where it used to stay in the inbox flagged and unread with nobody in ITFlow told. Email from someone who isn't a contact, at a domain no client has, while unknown senders aren't let in, still stays in the inbox flagged, so a mailbox shared with other email keeps it. The tickets list says how many are waiting. Each shows who it is from, its subject, a line of what it says and why it wasn't taken. - From Unprocessed Email an email can be opened (as text - nothing in it loads), made a ticket at the client you pick - for one of their contacts, or with the sender made a contact there first - added to a ticket, with the sender made a CC on it if you like, tried again (after making them a contact, say), dismissed, or downloaded as a .eml file. Try Again and Dismiss also work on several at once. The ticket or reply is made within a minute, as any email is, attachments and all, and the email shows which ticket it went on. Sorted and dismissed email is kept 30 days, and email nobody sorts 90. - Undo send: an emailed or texted reply waits a few seconds under the reply box - "Emailing it in 10 seconds" - with Undo and Send now. Undo leaves it in the reply box, as it was, to change or send later: nothing about it has happened yet - no email, no status change, no time added. Escape undoes it too, and leaving the page while it waits asks first. Admin > Settings > Tickets, Emails about a ticket, sets how long - 5, 10 (to start), 20 or 30 seconds - or turns it off. A public or internal note goes at once, as before. - Replies to ticket emails come back: an email about a ticket sent from another address than the mailbox ITFlow reads - a no-reply address, or one that isn't delivered there - asks for replies at that mailbox (Reply-To), where a client's reply used to go to the From address and be lost if nobody read it. Admin > Settings > Tickets says which addresses it uses, and turns it off for a From address that is an alias of the mailbox. - Links in emails stop working once they're done with: the link that opens a ticket, an invoice or a quote without signing in - in its emails, forwarded on or kept for years - stops working 90 days after the ticket is closed, the invoice paid in full, or the quote accepted, declined, invoiced or run out. Open tickets, unpaid invoices and quotes waiting for an answer always work, a reopened ticket's link works again, and emailing an invoice or quote again counts from then. An expired link says so and points to the client portal, where they're shown as always. On an invoice or a quote, Copy Client Link says Expired once it has. Admin > Settings > Security, Links in emails, sets 30, 60, 90 (to start), 180 days or a year - or never, as before. - Your own wording for the emails about a ticket to clients: Admin > Settings > Mail > Previews has Edit Wording on each of the 13 - ticket opened, their email became a ticket, scheduled ticket, reply, resolved, closed, a client's reply passed on, added as a CC, new ticket at their company, approval needed, work booked, booked work cancelled and replied to a closed ticket. Change its subject, heading, opening and closing text, with words in square brackets filled in as it goes, as in canned responses - [Ticket], [Subject], [First Name], [Client], [Agent], [Company] and each email's own, such as [By] and [When]. The preview shows it at once, the list marks the ones you changed, and Use ITFlow's Wording puts one back. The subject always starts with the ticket's number, so replies still find it. - Ignored senders: Admin > Ignored Senders lists the addresses and domains whose email the ticket mailbox sets aside - no ticket, no reply on one, no answer and nothing in Unprocessed Email. Newsletters, spam that gets through and noisy systems go straight to the mailbox's ITFlow folder. A domain takes its subdomains too, each shows how many emails it set aside and when the last came, and saving one that would set aside a contact's or a client's email says so. A mail server's bounce is still read, and Try an Email shows the step. -- Ignore Sender in Unprocessed Email: ignore the address, or everyone at its domain, and dismiss the others waiting from them in one go. A contact's address, a client's domain or a domain anyone can have an address at (gmail.com) is left to an admin, in Admin > Ignored Senders. - Bounces come back to the email they were about: a reply on a ticket says "Email to ... bounced" with what the mail server said, where it said it was emailed, and an invoice's or quote's history says its email bounced. The Mail Queue has a Bounced tab, and the email's window shows the mail server's reason. Each email ITFlow sends now has its own Message-ID, so the bounce finds it - one sent before the update is found by its address and subject. ### Bug Fixes @@ -172,7 +171,7 @@ Update from Maintenance > Update as usual - this release has fourteen database c - Mail review stage 7b: database 4.3.2 adds email_unprocessed. functions/mail_unprocessed.php keeps an email the parser couldn't take - mailUnprocessedKeep($raw, $meta, $reason) writes its MIME to uploads/mail_unprocessed (denied to the web, as uploads/backups) and a row, one per Message-ID - and mailUnprocessedDecide() records an agent's ticket, reply, retry or dismiss (agent/email_unprocessed.php, agent/post/email_unprocessed.php). cron/ticket_email_parser.php appends mailUnprocessedAsked() to the run as MailUnprocessedMessage (functions/mail_unprocessed_message.php), a FileMessage whose move() is mailUnprocessedDone() with the ticket it went on and whose flags do nothing: a ticket or reply ask skips steps 1 to 6 for addTicket() at the chosen contact or client (or a new contact, as the domain match makes one) or addReply() on the chosen ticket (the sender added through ticketAddCcs() first, if asked); a retry goes the usual way. mailUnprocessedLeave() takes the unprocessed and exception branches - kept, then marked seen and moved to the ITFlow folder; flagged and unread as before when it can't be kept; an ask that fails waits again with the reason. mailUnprocessedCleanup() runs nightly. - Mail review stage 7c: database 4.3.3 adds settings.config_ticket_reply_undo_seconds (0, 5, 10, 20 or 30 - TICKET_REPLY_UNDO_CHOICES) and config_ticket_reply_to_read, read by ticketReplySendSettings() (functions/ticket_reply_send.php). Undo send is the ticket page alone: #ticketReplyForm's data-undo-seconds, and agent/js/ticket_reply_extras.js holds an emailed or texted reply's submit in a window listener - after the form's own checks and the canned response check on the document - with the reply card inert and the [data-reply-hold] bar, then requestSubmit()s it with holdOk, cannedSendAnyway and noTimeOk set; agent/post/ticket.php is unchanged. emailQueue() puts Reply-To (ticketMailReplyToRead(): email to ticket on, the setting on, the IMAP username an address and not From) in a thread email's headers; MAIL_QUEUE_HEADERS lets one bare address through and sendQueueEmail() gives it to addReplyTo(), so Graph's large-email draft carries it too. - Mail review stage 7d: database 4.3.4 adds settings.config_guest_link_days (GUEST_LINK_DAYS_CHOICES, 90) and email_templates. functions/guest_link.php: guestLinkDoneAt() - ticket_closed_at; a Paid invoice's last unarchived payment (else its Paid history, else invoice_updated_at); an Accepted, Declined or Invoiced quote's history for it, or the end of quote_expire for one unanswered - later of that and the last history line with 'emailed' in it; guestLinkExpired() adds the days. ticketByGuestKey() returns null for an expired link, setting its new &$expired, so the guest ticket page, its attachments, its posts and its calendar file all refuse it; guest_view_invoice.php, guest_view_quote.php, the guest PDF exports (410) and the quote upload check it too, and guestLinkExpiredHtml() is the page; agent/invoice.php and agent/quote.php mark Copy Client Link Expired. functions/email_template.php: EMAIL_TEMPLATES (the 13 Tickets - to clients preview keys, with ITFlow's wording in placeholders), emailTemplateApply() replaces title, intro (paragraphs) and after where saved, filling [Placeholders] from emailTemplateValues() (ticketPlaceholderValues() and the email's own; empty when there is nothing), and puts the subject in template_subject for emailTemplateSubject(), which prefixes [REF] when it isn't in it. Applied in ticketEmailContent() (not the stranger's subject, nor Resolve - no response's intro), ticketMailSend(), ticketMailCcsAdded(), ticketMailColleaguesNew(), ticketMailTaskApproval() (the client's only) and ticketMailClosedReply(). admin/modals/email_template/email_template_edit.php and admin/post/email_template.php (save_email_template, reset_email_template - a part sent back as the default is NULL); mail_preview.php answers template and edited. -- Mail review stage 8: database 4.3.5 adds email_ignored_senders and email_queue.email_message_id (indexed, filled in from email_headers), email_about, email_bounced_at and email_bounce. functions/mail_ignore.php: mailIgnoreClean() takes an address or a domain (@ or *@ in front allowed), mailIgnoreFind() matches the From address - an address rule before a domain one, a domain matching its subdomains - and cron/ticket_email_parser.php sets the email aside (seen, moved, mailIgnoreHit()) after the bounce check, unless it is a MailUnprocessedMessage asked to make a ticket or reply; ticketMailTry() has the step. Admin > Ignored Senders (admin/email_ignored_senders.php, modals/email_ignored_sender/, admin/post/email_ignored_sender.php); Unprocessed Email's ignore_unprocessed_sender refuses a contact's address, a client's domain and EMAIL_PUBLIC_DOMAINS, and mailIgnoreDismissWaiting() dismisses the rest. emailQueue() gives every email a Message-ID (emailMessageId()) where the conversation gave none and takes about (invoice:N, quote:N - billingEmailQueue()'s about, passed by every invoice and quote send); addToMailQueue() keeps both. addBounce() calls mailQueueBounced(): the sent row by email_message_id, else the last week's sent to a failed address with the bounce's subject, marked with {address: why}, and a billing email's history written. mailQueueStateOf() has bounced (status 3 with email_bounced_at), mailQueueTabs() a Bounced tab, ticketReplyEmailStates() marks each bounced recipient and the key bounced, and ticketReplyEmailHtml() says so. .gitignore leaves out uploads/mail_unprocessed and uploads/kb, as the other upload folders. +- Mail review stage 8: database 4.3.5 adds email_ignored_senders and email_queue.email_message_id (indexed, filled in from email_headers), email_about, email_bounced_at and email_bounce. functions/mail_ignore.php: mailIgnoreClean() takes an address or a domain (@ or *@ in front allowed), mailIgnoreFind() matches the From address - an address rule before a domain one, a domain matching its subdomains - and cron/ticket_email_parser.php sets the email aside (seen, moved, mailIgnoreHit()) after the bounce check, unless it is a MailUnprocessedMessage asked to make a ticket or reply; ticketMailTry() has the step. Admin > Ignored Senders (admin/email_ignored_senders.php, modals/email_ignored_sender/, admin/post/email_ignored_sender.php). The parser leaves email from someone who isn't a contact at a domain no client has (unknown senders off), or whose sender checks failed, in the inbox flagged as before 7b - mailUnprocessedLeave() keeps only an email that was taken and failed, or an agent's ask; ticketMailTry() says Left in the inbox. emailQueue() gives every email a Message-ID (emailMessageId()) where the conversation gave none and takes about (invoice:N, quote:N - billingEmailQueue()'s about, passed by every invoice and quote send); addToMailQueue() keeps both. addBounce() calls mailQueueBounced(): the sent row by email_message_id, else the last week's sent to a failed address with the bounce's subject, marked with {address: why}, and a billing email's history written. mailQueueStateOf() has bounced (status 3 with email_bounced_at), mailQueueTabs() a Bounced tab, ticketReplyEmailStates() marks each bounced recipient and the key bounced, and ticketReplyEmailHtml() says so. .gitignore leaves out uploads/mail_unprocessed and uploads/kb, as the other upload folders. ## [26.12.2] diff --git a/admin/email_ignored_senders.php b/admin/email_ignored_senders.php index 5413979d3..21df90951 100644 --- a/admin/email_ignored_senders.php +++ b/admin/email_ignored_senders.php @@ -4,7 +4,7 @@ * Admin > Ignored Senders - addresses and domains whose email the ticket mailbox sets aside (functions/mail_ignore.php): * no ticket, no reply on one, no answer, no Unprocessed Email entry. Each with why, who added it, and how many emails it * set aside and the last. New and edit in modals/email_ignored_sender/email_ignored_sender.php; the handlers are - * admin/post/email_ignored_sender.php. Unprocessed Email's Ignore Sender adds them too. + * admin/post/email_ignored_sender.php. */ // Default Column Sortby Filter diff --git a/admin/settings_ticket.php b/admin/settings_ticket.php index 28ab1dd05..6a242cec9 100644 --- a/admin/settings_ticket.php +++ b/admin/settings_ticket.php @@ -33,7 +33,7 @@ echo settingsPageStart('ticket'); = settingsSwitch('config_ticket_email_parse', $config_ticket_email_parse) ?>