Files
itflow/functions.php
johnnyq 5f88ce4f8a Emails stage 1: one email layout for everything ITFlow sends in new functions/email.php, with emailHtml carrying the billing look plus the reply line kept first, inbox preview text, a quoted message block made safe through documentHtmlPurify with images pointed at the install, a callout and a contact line, emailFrom reading the sender from the settings as saved, and emailQueue escaping raw values for the mail queue with a greeting and footnote per recipient, billingEmailHtml now a wrapper so billing emails are unchanged; ticket emails to clients rebuilt on it through ticketEmailContent and ticketMailSend, replacing ticketMailContactAndWatchers, ticketMailCompany and getTicketSlaEmailNotice, covering a ticket opened by an agent, on a schedule or from an email, replies, resolved with when it closes and a reopen button, closed with a feedback button, watcher added, the reply to a closed ticket, public replies through the API, bulk reply and bulk resolve, and task approval requests, each saying why the recipient gets it instead of the collaborator block, new tickets showing the SLA response time and asking Urgent and High tickets to phone, subjects unchanged so threading and parsing keep working; tickets auto-closed by the nightly run now send the closed email when client notifications are on; fixes scheduled tickets never emailing the contact or the new-ticket address because recurringTicketRaise did not load those settings, and a backslash before apostrophes in the subject and sender name of the emailed-ticket reply; changelog updated
2026-10-17 22:19:44 -04:00

70 lines
3.2 KiB
PHP

<?php
// Role check failed wording
DEFINE("WORDING_ROLECHECK_FAILED", "You are not permitted to do that!");
// Ceiling on what the mail queue will attach to a single message. Uploads are
// allowed up to 500 MB, which no mail server will accept - anything over this is
// left on the ticket for the recipient to download instead of being emailed.
DEFINE("MAX_EMAIL_ATTACHMENT_BYTES", 10 * 1024 * 1024);
// functions.php is now a loader. Helper functions live in topical files
// under functions/ - see each file's header comment for scope.
require_once __DIR__ . '/functions/security.php';
require_once __DIR__ . '/functions/sanitize.php';
require_once __DIR__ . '/functions/format.php';
require_once __DIR__ . '/functions/request.php';
require_once __DIR__ . '/functions/files.php';
require_once __DIR__ . '/functions/domain.php';
require_once __DIR__ . '/functions/certificate.php';
require_once __DIR__ . '/functions/network.php';
require_once __DIR__ . '/functions/user.php';
require_once __DIR__ . '/functions/roles.php';
require_once __DIR__ . '/functions/api_keys.php';
require_once __DIR__ . '/functions/asset_interface.php';
require_once __DIR__ . '/functions/rack.php';
require_once __DIR__ . '/functions/asset.php';
require_once __DIR__ . '/functions/contact.php';
require_once __DIR__ . '/functions/software.php';
require_once __DIR__ . '/functions/location.php';
require_once __DIR__ . '/functions/vendor.php';
require_once __DIR__ . '/functions/credential.php';
require_once __DIR__ . '/functions/links.php';
require_once __DIR__ . '/functions/auth.php';
require_once __DIR__ . '/functions/logging.php';
require_once __DIR__ . '/functions/app.php';
require_once __DIR__ . '/functions/email.php';
require_once __DIR__ . '/functions/payments.php';
require_once __DIR__ . '/functions/sla.php';
require_once __DIR__ . '/functions/ai.php';
require_once __DIR__ . '/functions/export.php';
require_once __DIR__ . '/functions/calendar.php';
require_once __DIR__ . '/functions/backup.php';
require_once __DIR__ . '/functions/search.php';
require_once __DIR__ . '/functions/notifications.php';
require_once __DIR__ . '/functions/dashboard.php';
require_once __DIR__ . '/functions/reports.php';
require_once __DIR__ . '/functions/client_overview.php';
require_once __DIR__ . '/functions/tags.php';
require_once __DIR__ . '/functions/categories.php';
require_once __DIR__ . '/functions/ticket_fields.php';
require_once __DIR__ . '/functions/ticket.php';
require_once __DIR__ . '/functions/project.php';
require_once __DIR__ . '/functions/service.php';
require_once __DIR__ . '/functions/client_export.php';
require_once __DIR__ . '/functions/share.php';
require_once __DIR__ . '/functions/billing.php';
require_once __DIR__ . '/functions/products.php';
require_once __DIR__ . '/functions/billing_email.php';
require_once __DIR__ . '/functions/billing_pay.php';
require_once __DIR__ . '/functions/tax.php';
require_once __DIR__ . '/functions/expenses.php';
require_once __DIR__ . '/functions/expense_import.php';
require_once __DIR__ . '/functions/trips.php';
require_once __DIR__ . '/functions/income.php';
require_once __DIR__ . '/functions/income_import.php';
require_once __DIR__ . '/functions/accounts.php';
require_once __DIR__ . '/functions/reconcile.php';
require_once __DIR__ . '/functions/portal.php';