email/Messages
A collection of emails bound to email accounts and directories (for inboxes).
The collection is created and used by the microservice 'email'.
Is of type history
, partitioned and addressed using dates.
Entities for received emails are created automatically during synchronization of the IMAP directory with the IMAP server. Sent mail entities are created via API or other system services.
Letters have states that affect the service process. Thus, to send an email, the 'messageState' must be set to 'sending', and after sending it is automatically set to 'sent'. Additionally, to send, the 'messageDirection' field must contain a value of 'out'.
ATTENTION! All attachments, HTML content, and the native unattached content of the email are saved as attachments, stored in the file system. This introduces limitations on the file system, whose inodes can be quickly depleted if initially limited where attachments are stored.
Storage Type: history
.
Field | Description |
---|---|
|
Identifier. |
|
Parent email-account ID. |
|
Identifier directory. |
|
The date-time of the e-mail. Used also when defining the storage partition in the database. For emails to be sent, it is filled in by the initiator service before sending, it is used in queuing. For received e-mails it is filled in automatically, predominantly the original time of receipt of the e-mail on the server (headers Date or Delivery-Date). |
|
Letter Directions:
|
|
Letter Type:
|
|
Writing condition:
|
|
Filled with error content, if the received mail has error status, or the error occurred during sending. |
|
The original IMAP set identifier (in received emails). Used to detect the next unreceived email. |
|
The original incremental email identifier within its IMAP uidValidity (in received emails). Used to detect the next unreceived email. |
|
Email-address of the sender of the letter (in received letters) |
|
A list of email addresses of the recipients of the email. Automatically populated for emails received. Used when sending letters. |
|
A list of email addresses of other recipients of the email via copy (for emails that are sent). |
|
List of email addresses of hidden recipients (for sent emails). |
|
Email-address for automatic reply. For sent emails, if the value is empty, the value from the account options (field 'options.replyTo') is taken, and otherwise the value of the destination address is substituted ('to'). |
|
Email-address to be inserted in the In-Reply-To header of emails to be sent. |
|
Original email ID (for received emails). |
|
The original time of the email (for received emails). Extracted from the Date or Delivery-Date. |
|
Date-Time when the incoming email was actually received from the mail server and the entity was created. Filled in automatically for letters received. |
|
|
|
Post subject line. |
|
The body of the message if it is not text or html (for received emails). |
|
Message text, if text data is present in the block content (text/plain directly or in the multipart/alternative). For mailable letters, to be filled in by the initiator before sending. For received emails, it is automatically populated after the email has been successfully parsed. |
|
HTML email content (attachment), if there is html data in the content of the html block (text/html directly or in the multipart/alternative). For mailable letters, to be filled in by the initiator before sending. For received emails, it is automatically populated after the email has been successfully parsed. The file is placed on disk, essentially storing meta-information. |
|
Message size (for received e-mails) |
|
List of attachments, including inlays (multipart/mixed). For mailable letters, to be filled in by the initiator before sending. For received emails, it is automatically populated after the email has been successfully parsed. Attachments are placed on disk, essentially storing meta-information. |
|
Object - list of inlines (resources with links from the body of the email). When sending an email using an object, a specific set of parameters can be set. In particular, you can set a header value for a particular attachment 'Content-Type'. For attachments that require specific parameters to be specified, the object must contain a key - the name of the file in the 'attachments' collection, and a value - an object with a set of supported properties: 'content_type'. For example: { "file.ics": {"content_type": "text/calendar; charset=utf-8; method=REQUEST; name=file.ics"} } |
|
Object - list of inlines (resources with links from the body of the email). They are placed in the same 'multipart/related' part of the HTML body of the email. To send inlines, you should specify an object where the keys are Content-Id and the values are the file names in the collection attachments. For example: { "15623784-1562-3784-5906-156237845906": "myfile.png" } |
|
The original unopened incoming email (for received emails). The file is placed on disk, essentially storing meta-information. |