Loading...
 
Skip to main content

Emails in Unified Index


Managing emails in Tiki is essential for users who want centralized access to their messages. With the addition of the report functionality for available emails, users can now view and manage emails from different folders and IMAP accounts.
The Unified Index in Tiki enhances the capability to manage emails effectively by integrating them into a centralized search. This documentation outlines how to utilize the new feature for reporting on available emails and provides examples for better email management.

Overview of the Feature


The aim of this functionality is to allow users to view the latest messages from specific folders or mailboxes and facilitates the easy movement or copying of these messages to another IMAP mailbox or tracker.

If no specific folder or account is set, the tool defaults to the current user's mailbox accessible via
Copy to clipboard
tiki-webmail.php?page=message_list&list_path=combined_inbox
.

Use Cases

  • Accessing emails from a low-volume mailbox that users may overlook.
  • Tracking unread or flagged emails associated with specific tracker items.

Filtering Options


The filtering mechanism utilizes the syntax available in the PluginList plugin, providing flexible query capabilities. Here are some example queries:

  • Show all unread or flagged emails in a tracker item in category 23.
  • Show all emails less than 30 days old in tracker item 2672 and folder 'abc' of IMAP account 'XYZ'.


The integration with Cypht allows for saved searches to enhance usability.

Display Options


The display feature currently shows just the number of messages, with an option to click for access to detailed views.

DynamicList Usage


DynamicList can be used as a parent filter for sublist queries. It enables the extraction of emails based on specific relationships. The DynamicList should utilize the multivalue search index, allowing values to be stored as multivalues. For example, you can use filters to retrieve related objects by their IDs with the following syntax:

Tiki syntax
Copy to clipboard
{filter field="object_id" content="parent.relationFieldName|object_ids"}

This converts the IDs of related objects into an array, facilitating more precise searching within the search index. For relation fields, you can also use:

Tiki syntax
Copy to clipboard
{filter field="relations" multivalue="tiki.file.attach.invert:trackeritem.object_id|multivalue"}

This allows for searching and matching multivalue items stored in the index.

Example Queries

Here are some examples of Tiki syntax that can be used to leverage this new functionality:

  • 1. Emails attached to a tracker item via a relation field:
Tiki syntax
Copy to clipboard
!!! Emails attached to $$widget1 [item784]$$ via the relation field {LIST()} {filter type="file"} {filter field="email_date" content="NOT "} {filter field="relations" multivalue="tiki.file.attach.invert:trackeritem:784"} {LIST}
  • 2. Unread emails attached to a tracker item:
Tiki syntax
Copy to clipboard
!!! Unread emails attached to $$widget1 [item784]$$ via the relation field {LIST()} {filter type="file"} {filter field="email_date" content="NOT "} {filter field="email_flags" multivalue="NOT Seen"} {filter field="relations" multivalue="tiki.file.attach.invert:trackeritem:784"} {LIST}
  • 3. Emails from the last 30 days from a specific IMAP folder in Cypht:
Tiki syntax
Copy to clipboard
!!! Emails from the last 30 days from a specific IMAP folder in Cypht {LIST()} {filter cypht="example@example.org>INBOX, example@example.org>Sent"} {filter range="email_date" to="now" gap="30 days"} {sort mode="email_date_desc"} {OUTPUT(template=table)} {column label="Subject" field="subject" mode="raw"} {column label="From" field="from" mode="raw"} {column label="Date" field="date"} {OUTPUT} {LIST}


A special thanks to Victor Emanouilov for the code examples provided.

With the addition of the report functionality for available emails, Tiki users can now manage their emails more efficiently and organized. This not only enhances the user experience but also facilitates the integration of emails into existing workflows.