email/Folders

Collection of IMAP directories bound to email accounts. The collection is created and used by the 'email' microservice.

Entities are created automatically during email account synchronization with the IMAP server. The created directory must be enabled to activate the service of receiving emails into the system.

Sent messages must also be bound to some directory. The directory for sent emails can be created manually with a limited set of populated fields: 'account_id', 'title'.

Storage type: category.

Table 1. Class fields
Field Description

id

Identifier.

account_id

Parent email account identifier.

title

Full IMAP directory name. For example, 'my.address@email/INBOX'. Substituted automatically when the directory is created during synchronization with the IMAP server.

Automatically generated names should not be changed.

name

Short IMAP directory name. For example, 'INBOX'. Substituted automatically when the directory is created during synchronization with the IMAP server.

Automatically generated names should not be changed.

enabled

Directory synchronization switch. Set to 'false' when the directory is created automatically during synchronization. The directory must be enabled to start synchronization of incoming emails with the system.

options

Additional options:

  • portion_limit (default 5) - number of emails processed per iteration by the receive operation.

  • load_existing (default true) - when a change of the directory uidValidity is detected, forcibly starts loading all messages from the directory from the very first one.

  • keep_unseen (default false) - switching to true leaves the email unread flag unchanged.

  • store_raw_as_file (default true) - switching to false cancels saving the source content of the received email (RFC-822) as a file attachment to the entity.

  • store_html_as_file (default true) - switching to false cancels saving the html part from the received email as a file attachment to the entity.

deleteOnServer

Switch for automatic deletion of the email from the server after reception. Default 'false'. If deletion is refused, the system remembers and uses the identifier of the last received email and requests the next emails.

sendOnly

Switch for synchronization mode for receiving emails. The directory may not exist on the IMAP server. For all IMAP server directories - false. For the virtual message sending directory automatically created for accounts with the 'isSystem' flag - true.

flags

List of IMAP directory flags. Substituted automatically when the directory is created during synchronization with the IMAP server.

Automatically generated values should not be changed.