tbl_pending_emails

-1 rows


Description

Module: System/Utility - Pending Email Queue
Purpose: Stores email messages that have been generated by the application but are queued to be sent asynchronously or processed by a batch job (e.g., due to temporary email server downtime, rate limiting, or to improve transactional response time).
Data: Captures a unique ID, the full serialized content of the email message (message_json), and auditing details (who/when the request to send was created).
Process Usage:
- Asynchronous Sending: A scheduled job (daemon/cron) periodically reads records from this table, attempts to send the emails, and then deletes successful entries.
- Recovery: Ensures that critical notifications (e.g., password resets, approval requests) are not lost if the email service is temporarily unavailable.
Key Points:
- Queue Management: Acts as a reliable queue for outbound communication.
- The entire email payload (recipient, subject, body, attachments) is stored in the message_json column.
Business Impact: Guarantees reliable delivery of system notifications and prevents email sending latency from slowing down core application transactions.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id bigserial 19 nextval('tbl_pending_emails_id_seq'::regclass)

Primary key
Format: Long (auto-increment)
Used as: Unique identifier for this specific queued email message.

message_json text 2147483647 null

A JSON string containing the complete, serialized structure of the email message, including recipient(s), subject, body content, and any metadata required for sending.

createdby varchar 50 null
createddate timestamp 29,6 null
modifiedby varchar 50 null
modifieddate timestamp 29,6 null

Indexes

Constraint Name Type Sort Column(s)
pk_tbl_pending_emails Primary key Asc id

Relationships