meta data for this page

Email ticketing

Client contacts can create/update tickets via e-mail.

1. Install PHP extensions: (These will be installed if you installed via script method)

  • php-imap
  • php-mailparse

2. Configure at Settings > Mail:

  • IMAP Host
  • IMAP Port
  • IMAP Encryption
  • IMAP Username
  • IMAP Password

3. Turn on: Settings > Ticket > Email-to-ticket parsing

4. Add a cron job to run cron_ticket_email_parser.php every minute (skip if you set it up earlier or installed using the script)

5. Decide whether you wish to automatically create tickets for every email, or just emails from client domains:

- Ensure that all clients have the correct 'domains' added in the Domain tracker module (default), or

- Enable Admin > Ticket > “Create tickets for emails from unknown senders/domains

How it works

  1. Cron runs cron_ticket_email_parser.php
  2. The email inbox is checked for unread messages
  3. If an unread message is found, it's marked as read & checked for a ticket reference in the subject ((e.g. [TCK-091])
  4. If there is a ticket reference
    1. The ticket info is fetched & checked to be open
      1. If the ticket is open, the reply is added
      2. If the ticket is closed, an auto response is sent and a notification raised
  5. If there isn't a ticket reference - it's treated as a new message
    1. We check for an existing contact (based on the email) and raise the ticket under them
    2. If there's no contact, we check if the from domain exists as a website for a client
      1. If so (or the unknown senders setting is enabled), we create a new contact under that client for the user and raise the ticket under them
      2. If not, we leave the email in the inbox to be actioned manually
  6. 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

  • Only supports basic authentication. This will not work with Microsoft as they require OAuth.
  • 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 “Create tickets for emails from unknown senders/domains