NOTICE: All information contained herein is, and remains
the property of TechnoCore.
The intellectual and technical concepts contained
herein are proprietary to TechnoCore and dissemination of this information or reproduction of this material
is strictly forbidden unless prior written permission is obtained
from TechnoCore.
The ObjImap object is responsible for handling IMAP connections and processing emails.
Scans are configured by inserting a row into the def_imap table. The table structure is as follows:
| Field | Type | Null | Key | Default | Extra | Description |
|---|---|---|---|---|---|---|
| Imapcode | char(50) | NO | PRI | NULL | A unique identifier for the IMAP configuration. | |
| Package | char(50) | NO | PRI | NULL | The package associated with this configuration. | |
| IsActive | char(5) | NO | NULL | A flag to enable or disable the scan ('true'/'false'). | ||
| Workflow | char(255) | YES | NULL | The workflow to be triggered when a matching email is found. | ||
| RunFrequency | int(11) | NO | NULL | The frequency of the scan in minutes. | ||
| Timeslip | char(50) | NO | NULL | A time window or offset for the scan execution. | ||
| PreSql | text | NO | '' | SQL to be executed before the scan. | ||
| PostSql | text | NO | '' | SQL to be executed after the scan. | ||
| Tag | char(50) | NO | NULL | A tag for categorizing or filtering scans. | ||
| SearchSubject | char(5) | NO | NULL | A flag to enable or disable searching in the email subject ('true'/'false'). | ||
| RegexSubject | char(255) | YES | NULL | The regular expression to match against the email subject. | ||
| SearchBody | char(5) | NO | NULL | A flag to enable or disable searching in the email body ('true'/'false'). | ||
| RegexContent | char(255) | YES | NULL | The regular expression to match against the email body. | ||
| DoDelete | char(5) | NO | NULL | A flag to determine if matching emails should be deleted ('true'/'false'). | ||
| LastRun | timestamp | NO | current_timestamp() | The timestamp of the last scan execution. | ||
| Folder | char(50) | NO | NULL | The IMAP folder to scan (e.g., "INBOX"). | ||
| AttachmentFolder | text | NO | '' | The directory where attachments should be saved. | ||
| RemoteConnection | char(255) | NO | NULL | The connection details for the IMAP server. | ||
| Filename | text | NO | '' | The filename to use when saving attachments or email content. | ||
| ImportUnique | char(5) | NO | NULL | A flag to prevent duplicate imports ('true'/'false'). |