outbox Table (351)
Outgoing emails with sending status and other infoFields
| Name | Description | Type | Nullable |
|---|---|---|---|
| id | Primary key | PK | No |
| ticket_id | The ticket.id this reference is connected to. | FK ticket | Yes |
| message_id | The message.id this reference is connected to. | FK ej_message | Yes |
| subject | Subject of the mail | String(255) | No |
| from_email | Mail address of the sender | String(255) | No |
| from_envelope | Envelope (smtp) Mail address of the sender | String(255) | No |
| rcpt | A list of recipience | Clob | Yes |
| mail_size | The size of the mail in bytes | Int | No |
| created | When the mail was created | DateTime | Yes |
| status | Status enum | Int | No |
| retries | The number of times we have tried to send this mail | Int | No |
| next_retry | When is the next time we should try again? | DateTime | Yes |
| pid | The process id owning this message | Int | No |
| last_error | The last error reported when sending this message | String(255) | Yes |
| type | Indicates if this is a SMS to be sent via WebServices or a normal email. 0 = email, 1 = sms | type | No |
| rfc822_content | The content of the outgoing email as a string. Alternative to using outbox file | Clob | Yes |

Indexes
| Fields | Types | Description |
|---|---|---|
| ticket_id | FK | Index |
| message_id | FK | Index |
Relationships
| Table | Description |
|---|---|
| ej_message | This table contains the messages listed under tickets. |
| sms | This table will hold outgoing sms messages when transmitted with WebServices |
| ticket | This table contains the tickets (requests) of the system. Its purpose should be evident. |
Replication Flags
- None
Security Flags
- No access control via user’s Role.