meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ticket_email_parse [2023/01/31 17:38] – created - external edit 127.0.0.1 | ticket_email_parse [2025/06/15 03:37] (current) – 68.162.129.20 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| Client contacts can create/ | Client contacts can create/ | ||
| - | 1. Install PHP extensions: | + | 1. Install PHP extensions: |
| * php-imap | * php-imap | ||
| * php-mailparse | * php-mailparse | ||
| Line 11: | Line 11: | ||
| * IMAP Port | * IMAP Port | ||
| * IMAP Encryption | * IMAP Encryption | ||
| + | * IMAP Username | ||
| + | * IMAP Password | ||
| - | 3. Turn on: Settings > Ticket > Email-to-ticket parsing | + | 3. Turn on: Settings > Ticket > **Email-to-ticket parsing** |
| - | 4. Add a cron job to run //email_parser_cron.php// every minute | + | 4. Add a cron job to run //cron_ticket_email_parser.php// every minute |
| - | 5. Ensure that all clients have the correct ' | + | 5. Decide whether you wish to automatically create tickets |
| + | - Ensure that all clients have the correct ' | ||
| + | |||
| + | - Enable Admin > Ticket > "// | ||
| + | |||
| + | ====== How it works ====== | ||
| + | - Cron runs cron_ticket_email_parser.php | ||
| + | - The email inbox is checked for unread messages | ||
| + | - If an unread message is found, it's marked as read & checked for a ticket reference in the subject ((e.g. [TCK-091]) | ||
| + | - If there is a ticket reference | ||
| + | - The ticket info is fetched & checked to be open | ||
| + | - If the ticket is open, the reply is added | ||
| + | - If the ticket is closed, an auto response is sent and a notification raised | ||
| + | - If there isn't a ticket reference - it's treated as a new message | ||
| + | - We check for an existing contact (based on the email) and raise the ticket under them | ||
| + | - If there' | ||
| + | - If so, we create a new contact under that client for the user and raise the ticket under them | ||
| + | - If not, we leave the email in the inbox to be actioned manually (or if the //unknown senders// setting is enabled we create the ticket with no contact/ | ||
| + | - If the email was successfully processed (e.g. a ticket raised / reply added), the message is moved to the ITFlow folder once attachments are processed | ||
| ===== Notes ===== | ===== Notes ===== | ||
| - | * Only supports **basic auth**entication | + | * Only supports **basic auth**entication. This will not work with Microsoft as they require OAuth. |
| - | * The IMAP connection uses the same SMTP Username/ | + | |
| * As closed tickets cannot be re-opened, replies to closed tickets raise a notification | * As closed tickets cannot be re-opened, replies to closed tickets raise a notification | ||
| + | * By default, emails from addresses that can't be matched to a client (via registered domains), contact (via email), or existing ticket (via subject line) are left in the inbox and flagged for review. | ||
| + | * This behaviour can be adjusted by enabling "// | ||