feat(email): hold relationship mail to business hours
queueEmail gains options.respectBusinessHours: snaps the send time to the next open business-hours block (from now), only deferring when it actually falls outside hours. Applied to dunning reminders + gallery-expiry warnings; transactional/admin-initiated mail stays immediate. No-op until business hours are configured.
This commit is contained in:
@@ -2650,7 +2650,9 @@ async function applyReminder(invoice, lineItems, level, adminId) {
|
||||
contentPath: pdfPath,
|
||||
contentType: 'application/pdf',
|
||||
}],
|
||||
});
|
||||
// Dunning reminders are relationship mail — hold to business hours so
|
||||
// the customer isn't pinged overnight (no-op unless hours configured).
|
||||
}, { respectBusinessHours: true });
|
||||
|
||||
try {
|
||||
await logActivity('invoice_reminder_sent', { invoiceId: invoice.id, level, lateFeeMinor },
|
||||
|
||||
Reference in New Issue
Block a user