Commit Graph

25 Commits

Author SHA1 Message Date
johnnyq
0618ecfdd0 Mail queue stage 2: keep why each email failed or who cancelled it in the new email_queue.email_error column (database 3.3.7), written by the worker on every failure path and cleared on send or retry, show and search it on the list, include it in failure alerts and alert when the last retry gives up, and rebuild the email view with its status, reason, recipients, tries, times, attachments, calendar file, Retry now, Cancel and Delete, showing the message in a sandboxed frame 2026-10-20 11:34:57 -04:00
johnnyq
7e2971b610 Mail queue stage 1: rebuild the mail queue list with Waiting, Sending, Retrying, Failed, Sent and Cancelled tabs and counts, a status line per email, a banner when sending is off, cron is off or not running, the job is disabled or mail is waiting too long, and Retry now, Cancel and Delete per email and in bulk applied only where possible, add a Cancelled status, record the failure time for bad addresses, share the retry limits between the page and the worker, and fix the theme favicon reset failing on its audit entry 2026-10-20 11:34:23 -04:00
johnnyq
3ec52974db Calendar modernization: calendar page rebuilt to load only the dates on screen with show or hide toggles for each calendar and for built-in sources (scheduled tickets, project start and due dates, service reviews, recurring tickets, renewals, invoices due), a filter for one agent, quick looks on click, drag to reschedule tickets and events that do not repeat, and a To schedule panel for dragging open unscheduled tickets onto the calendar; events get a shared add/edit form with repeats every N days/weeks/months/years with an optional end date and single skipped occurrences, a client site, location or meeting link, agents, client contacts and guest emails as attendees, iCalendar invitations with updates and cancellations sent to invited attendees, an event quick look with map and join links, .ics download and resend; each agent gets a personal subscription link for their schedule (their own or the whole team, busy only option, respects role and client access, stops when the account is disabled) with setup help for Google, Outlook, Apple, Nextcloud and Thunderbird; shared calendar feeds and invites now publish timed events with TZID and VTIMEZONE so repeating events keep their time across DST, with INTERVAL, UNTIL and EXDATE support; managing calendars is limited to admins; ticket schedule logic moved into functions/ticket.php and shared with the calendar, the schedule dialog shows the assigned agent's day, and ticket visit calendar files are rebuilt without zapcal as one-hour published events; mail queue sends invitations and cancellations as a text/calendar part and other calendar files as invite.ics; dashboard schedule shows only events the agent is on or added, client overview Coming up and client sidebar count use upcoming events, sites and contacts get New event shortcuts, demo data uses repeating events and attendees; database update 2.8.8 adds event repeat interval, until, skip, sequence and created by, attendee user and invited at, user_calendar_feeds, and widens email_queue.email_cal_str to text 2026-10-15 19:17:17 -04:00
johnnyq
076f45abb0 Remove Stale SMTP IMAP host if switching Standard SMTP.IMAP to OAUTH 2026-08-09 23:59:54 -04:00
johnnyq
b3744e9ed5 More sweeps to replace select * with actual returned column names dramatically reduces php memory usage and speeds up processing dramatically especially in the crons since they run all the time 2026-08-06 13:10:23 -04:00
johnnyq
b8c9d5b4cf Query Optimization: Select only needed columns instead of SELECT * on looped queries 2026-08-06 12:59:43 -04:00
johnnyq
0631c45040 Fix Cron Schedule and new directory includes created inside cron for the cron lock 2026-07-30 17:06:07 -04:00
johnnyq
38e8edea19 Cron runs all jobs from a single dispatcher cron.php which should now be run every minute and all other cron jobs eliminated from cron 2026-07-30 13:48:39 -04:00
johnnyq
2395a3ee16 Phase 2 of ticket attachements by agents 2026-07-29 18:10:34 -04:00
johnnyq
c5ff3e2a3f Normalize line endings to LF; add .gitattributes and .editorconfig 2026-07-28 17:45:52 -04:00
johnnyq
4c65b8c561 Clear mail bodies after successful delivery 2026-07-28 00:18:07 -04:00
johnnyq
a844d7b428 Adds a shared flock guard used by all five cron entry points, keyed per
script and per install. Replaces the mail queue's own lock file, which
was not atomic and could be deleted out from under a long run. Bounds
the SMTP conversation so an unresponsive server cannot hold the lock.
Recovers rows left at Sending by a run that died, which nothing
previously picked up.
2026-07-27 17:35:39 -04:00
johnnyq
686fca99e1 Fix Possible duplicate emails in a race condition in mail queue 2026-07-27 16:59:10 -04:00
johnnyq
b57ddc0e5c Replace Function sanitizeInput() with just escapeSql() and update all instances throughout 2026-07-14 17:17:50 -04:00
johnnyq
8da3a107fb Rename plugins to libs and update all file references 2026-07-10 13:24:20 -04:00
cs2000
fc33312e79 SonarCube Suggestion
Rename multiple functions to conform to project naming rules (^[a-z][a-zA-Z0-9]*$). This is a non-functional refactor for style/CI compliance and consistency.
2026-02-05 10:15:52 +00:00
cs2000
10d1a902d9 Changes for M365 oAuth now using latest dev code
My bad, my changes were made previously using my installed version and not the latest changes in the dev branch, i have pulled the dev branch and merged my changes with the latest codebase.
2026-02-05 09:37:22 +00:00
cs2000
f3f9d0dd71 Changes for M365 oAuth
- Added OAuth token lifecycle helpers (expiry check, refresh, persistence).
- Updated SMTP XOAUTH2 send path to automatically refresh expired/missing access tokens for Microsoft/Google providers before sending queued mail.
2026-02-04 13:25:32 +00:00
johnnyq
0a30300bde replace all instances of mysqli_fetch_array with mysqli_fetch_assoc for better performance and memory usage 2026-01-14 17:30:23 -05:00
wrongecho
7c83ba15b9 Mail queue - minor comment syntax error 2025-12-03 15:43:55 +00:00
wrongecho
10bfbed4bb Mail queue - introduce a --no-mx-validation flag to bypass recipient domain MX validation 2025-12-03 15:30:26 +00:00
johnnyq
185ea7d6ac Fix 'Email from at' On tickets that come from emails, was cuasing dup html head body tags causing htmlPurifier to strip it in ticket viewing, so we removed html body and head tags also remove orginal reply on reply ticket emails this removed ##- Please type your reply above this line -## and anything after it. Also removed the custom CSS that was embedded for all email sent out from ITFlow 2025-11-22 17:40:44 -05:00
wrongecho
891f71006b Mail queue - Recipient domain MX validation before sending 2025-11-06 16:58:18 +00:00
johnnyq
76c9933baf Update imap and smtp providers to allow empty string if empty do not execute mail queue 2025-10-02 14:28:43 -04:00
johnnyq
c769bbc405 Created new Mail Queuer to take advantage of OAUTH2 for M365 and Google Workspaces not enabled by default 2025-09-16 15:43:54 -04:00