email/Folders

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

Entities are created automatically during synchronization of the email account with the IMAP server. It is required to enable the created directory to activate the service of receiving letters to the system.

Sent messages must also be bound to a directory of some kind. A catalog for the emails to be sent can be created manually with a limited number of fields filled in: 'account_id', 'title'.

Storage Type: category.

Table 1. Class fields
Field Description

id

Identifier.

account_id

title

The full name of the IMAP directory. For example, 'my.address@yandex/INBOX'. It is substituted automatically when the directory is created during synchronization with the IMAP server.

Automatically generated titles should not be changed.

name

The short name of the IMAP directory. For example, 'INBOX'. It is substituted automatically when the directory is created during synchronization with the IMAP server.

Automatically generated titles should not be changed.

enabled

Catalog Synchronization Switch. When automatically creating a catalog during synchronization is set to 'false'. Requires directory enablement to trigger inbox synchronization with the system.

options

Additional Options:

  • portion_limit (default 5) - the number of e-mails processed in one iteration by the receive operation.

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

  • keep_unseen (default false) - switching to true leaves unchanged the sign of unread mail.

  • store_raw_as_file (defaults to true) - toggling to false will cancel saving the original content of the received email (RFC-822) as an attachment file to the entity.

  • store_html_as_file (defaults to true) - toggling to false will cancel saving the html section from the received email as an attachment file to the entity.

deleteOnServer

Turns off the mode of automatic deletion of an email from the server after it is received. Default 'false'. If you refuse to delete, the system remembers and uses the ID of the last email received and orders the next emails to be received.

sendOnly

Synchronization mode switch for receiving emails. The directory may not exist on the IMAP server. For all IMAP server directories - false. For the virtual messaging directory automatically created for accounts with the attribute 'isSystem' - true.

flags

A list of IMAP flags of the directory. It is substituted automatically when the directory is created during synchronization with the IMAP server.

The automatically generated value should not be changed.