Skip to main content

Email Queue

The Email Queue serves two purposes: it is an audit log of every email OSPROV sends, and a retry mechanism for failed deliveries. Every outbound email — successful or not — is recorded here.

note

Email failures do not block workflow progression. The workflow continues regardless of whether the email was delivered. Failures are captured here for later retry.

Navigate to Admin → Email Queues to access it.


Tabs

  • Pending / Failed — emails that have not been delivered yet
  • History — emails that were sent successfully

Status Meanings

StatusWhat it means
pendingSend attempt failed — queued for auto-retry
failureOne or more retry attempts also failed
completedDelivered successfully

Both pending and failure appear in the Pending/Failed tab and are eligible for retry.


Auto-Retry

A background job runs every 30 minutes and automatically retries failed emails.

Rules:

  • Picks up emails with status pending or failure where retry count < 3
  • Increments the retry counter on the row before attempting
  • Waits 10 seconds between each email to avoid flooding the mail server
  • On success → marks row as completed
  • On SMTP failure → marks the original row as completed and creates a new pending row with retry count reset to 0

The 3-retry cap applies per row. Because SMTP failures create a fresh row, the same logical email can re-enter the retry queue repeatedly. In practice the system keeps attempting until it succeeds or an admin intervenes. If the same email keeps reappearing in the Pending/Failed tab, check the last_error — a persistent error (invalid address, mail server misconfiguration) will not self-resolve.

Retry re-runs the original notification logic

When OSPROV retries an email, it does not resend the stored email body. It re-runs the original notification logic fresh from the workflow submission and task configuration. If the email template was changed after the original failure, the retried email will use the updated template content.


What Admins Can Do

View an email

Click any record in either tab to open it. You can see:

  • Full rendered HTML of the email — exactly what the recipient would receive
  • To / CC / BCC recipients
  • Subject (already resolved)
  • Email type and linked submission
  • Last error message from the most recent failure attempt
  • Retry count

Manual retry

From the Pending/Failed tab, click Retry on any email to immediately attempt resend. Manual retry bypasses the 3-attempt cap — an admin can retry even after auto-retry has exhausted its attempts.

After a successful manual retry, you will see two completed entries in the History tab for that email — one from the resend and one from the original attempt being closed out. This is expected, not a bug.


What Each Record Contains

FieldWhat it stores
TypeWhich workflow function triggered it (Notification, Approval, Reminder, Document, etc.)
To / CC / BCCAll recipient addresses
SubjectAlready resolved with placeholder values
BodyFull HTML with all placeholders substituted
AttachmentsFilenames of any attached files
Linked submissionClick-through to the source submission
Last errorExact error message from the most recent failure
Retry countNumber of auto-retry attempts made

Auto-Cleanup

The same background job that handles retries also deletes old records:

RuleWhat gets deleted
Completed emails older than 30 daysRemoved from History
All emails (any status) older than 4 monthsRemoved regardless of status

If you need to retain email history longer for audit purposes, this requires a configuration change — raise it with your system administrator.


Troubleshooting

ProblemLikely cause
Email in Pending/Failed but workflow already completedNormal — email failure does not block the workflow. Retry from the admin panel.
Placeholder shows as literal [fieldKey] textField key not found in submission data. Check Technical Properties — it's case-sensitive.
No recipients received the emailRole on Notification task has no users matching the workflow's auth channel. Consider ticking "Ignore Authorization Channel" on the task.
PDF attachment missing from emailPDF generation failed silently. Email was still sent without attachment. Check submission for the PDF and investigate document generation logs.
Same email appearing multiple times in HistoryExpected after retries. Each successful resend creates an additional completed record.
Email repeatedly reappearing in Pending/FailedEach SMTP failure creates a new queue row with retries reset. Check last_error — if it's always the same error, fix the underlying issue (invalid address, mail server config) and manually retry.
Notification task not triggeringCheck the Previous Status setting. If set to approved but the preceding task completed with a different status, the notification will not fire.