mirror of
https://github.com/rickbarrette/redmine_qbo_reminders.git
synced 2026-11-17 13:00:36 -05:00
Reminders for redmine_qbo_calendar appointments, to the customer's email in QuickBooks, sent from your own mailbox through Google Workspace's SMTP relay (or Gmail SMTP with an app password, or Redmine's email settings). - Schedule: N days before at a set time, only within sending hours, not within N hours of the appointment; rescheduling sends one for the new time - Plain text + HTML from an editable template with placeholders and sections, calendar (.ics) attachment, Message-ID on the sending domain - Each reminder claimed in the database before sending (no duplicates across processes); failures retried 3 times - Appointment page: status and Send now / Send again; customer page: turn reminders off; settings: test email, recent reminders, send due now - Runs on page loads every 10 minutes, or from cron via rake redmine:appointment_reminders:send - README covers Google Workspace setup and SPF/DKIM/DMARC Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BiwYMjhoQvL7XsKKfRz4pM
20 lines
1.0 KiB
ERB
20 lines
1.0 KiB
ERB
<%# Turning appointment reminders on or off for a customer, on the customer page (redmine_qbo's show_customer_view_right hook) %>
|
|
<% customer = local_assigns[:customer] %>
|
|
<% if customer && User.current.allowed_to?(:view_customer_appointments, nil, global: true) %>
|
|
<% off = ReminderOptOut.opted_out?(customer) %>
|
|
<div class="customer-reminders">
|
|
<i class="fa-regular fa-envelope"></i>
|
|
<strong><%= l(:label_appointment_reminders) %>:</strong>
|
|
<%= off ? l(:text_customer_reminders_off) : l(:text_customer_reminders_on) %>
|
|
<% if User.current.allowed_to?(:send_appointment_reminders, nil, global: true) %>
|
|
<%= button_to (off ? l(:button_reminders_on) : l(:button_reminders_off)),
|
|
(off ? customer_reminders_on_path(customer) : customer_reminders_off_path(customer)),
|
|
method: :post, form_class: 'customer-reminders-toggle' %>
|
|
<% end %>
|
|
</div>
|
|
<style>
|
|
.customer-reminders { margin: 10px 0; }
|
|
form.customer-reminders-toggle { display: inline; margin-left: 8px; }
|
|
</style>
|
|
<% end %>
|