Skip to content
English
  • There are no suggestions because the search field is empty.

Setting Up Mail Rules

Mail rules define what Essal Office does with each email it retrieves from the import inbox. They let you automatically assign metadata — like correspondent, document type, tags, and title — based on conditions from the email itself (sender, subject, or body content).


What Mail Rules Do

Without mail rules, all imported documents land in your archive with minimal metadata. With mail rules, you can:

  • Assign the correspondent based on the email sender
  • Set the document type based on the subject line
  • Add specific tags automatically
  • Set the document title from the email subject
  • Control what happens to the email after import

Creating a Mail Rule

  1. Go to SettingsMail Rules (or Administration > Mail Rules)
  2. Click Add rule
  3. Configure the rule:

Filter Conditions

Conditions determine which emails this rule applies to:

  • Condition: **From**
  • Checks: The sender's email address (exact, contains, or regex)


  • Condition: **Subject**
  • Checks: The email subject line (contains, exact, regex)


  • Condition: **Body**
  • Checks: Text anywhere in the email body

Multiple conditions within one rule must all match (AND logic).


Actions

When conditions match, Essal Office applies these actions to the imported document:


  • Action: **Assign correspondent**
  • Effect: Sets the correspondent on the imported document


  • Action: **Assign document type**
  • Effect: Sets the document type


  • Action: **Assign tags**
  • Effect: Adds specific tags to the document


  • Action: **Set title**
  • Effect: Sets the document title (can use the email subject as a template)


  • Action: **Set owner**
  • Effect: Assigns the document to a specific user


  • Action: **Mark email as**
  • Effect: Mark the processed email as read, or move it to a folder


  • Action: **Delete email**
  • Effect: Permanently delete the email from the mailbox after import


Rule Ordering and Priority

Rules are evaluated from top to bottom. The first rule whose conditions match is applied. If no rule matches, the document is imported with no automatic metadata.

Drag rules in the list to change their order. Put more specific rules above more general ones to avoid the general rule winning first.


Example: Automatic Invoice Import

Rule name: Supplier Invoice Import

Conditions: - From contains: @acme-supplies.com

Actions: - Assign correspondent: Acme Supplies - Assign document type: Invoice - Add tags: Finance, Inbox - Set title: Use email subject

This rule processes all emails from Acme with the right metadata applied automatically.


Testing Rules

After configuring rules, send a test email to the import address from the expected sender. Trigger a manual import check and verify the imported document has the expected metadata.