TITAN Documentation

How to setup iMap for Tickets


The Ticket System can use PHP's iMap extension to automatically check an inbox for replied ticket responses. Those responses are then turned into ticket replies, stored in the database and presented on TITAN's Ticket View page.

You can setup iMap to be used with your SMTP server. In order to do that, you need to make sure you have iMap PHP extension installed on your system.

Once done, you'll need to get the following information:

  • Protocol Host & Port
  • SMTP Email Address
  • SMTP Password

Once you have these settings, you need to put them in your Ticket Settings in the Admin Panel. We used GMail for our SMTP server and the settings look like the screenshot below:

Note: If you are using a GMail account, you need to make sure you have enabled iMap settings. You can do this by going to your Gmail Inbox, clicking Settings and then Forwarding and POP/IMAP. Once you select enable, make sure you click the Save button.

Once you have saved these settings, you then need to setup a cron job to check the SMTP server every x minutes. We recommend every 5 minutes, but you can change it to 1 minute, 10 minutes or however many times you like. The longer the time you set, the less amount of times the script will check for email replies and update your tickets.

The cron in question should be:

*/5 * * * * * wget http://yoursite.com/cron/ticket_replies

You can find this cron URL also in the Ticket Settings page.

Once you have set your cron up, you should test out your Tickets. Create a ticket with a different email address than the one you used for SMTP and you should receive an email notification. In your inbox, reply to that email and then wait 5 minutes (or however long you set the cron up to check the SMTP server) and you should see your email reply attached to the ticket as a ticket reply on TITAN.

If you want to verify that your IMAP is working, visit the cron URL in your browser and you should see any error messages. If it's blank, it means it's working.