Email Piping / Auto Importing Tickets

Email Piping / Auto Importing Tickets

Email Piping is a feature in our CRM to auto open or reply to ticket from email.

You can’t use both methods for auto importing tickets. You need to configure only 1 method (cPanel Forwarders or IMAP) depends on your requirements.

  • On your mail server you must create a unique email account for each support department, this must be a full inbox.
  • In Perfex navigate to Setup -> Support -> Departments > Edit and enter your email address for this department.

Email forwarders method (cPanel Method 1)

  1. Login to you cPanel account
  2. Go to Forwarders section and setup forwarder using the following command based on your department “php -q /home/username/public_html/crm/pipe.php” . Eq. If you department is Info and you setup [email protected] as email in the department you should forward this email. Repeat this step for each department.
Email Piping, cPanel Forwarders
TIP: You can check the pipe path into Setup -> Settings -> Tickets -> Email Piping.

IMAP  (Method 2)

This method auto import tickets directly reading your email.

  • If you want to use this method you need to have setup cron job.
  • The cron will run each 5 minutes and will check for new tickets.

NOTE: The script will check only non-opened emails to prevent checking all the emails again and again and avoid slowing down the system. After checking email if you don’t have checked delete after import the script will auto mark the email as READ.

If you are setup existing email address that has a lot of emails make sure that all emails are marked as READ to prevent importing spam emails when the cron job will run and read your emails the first time.

Your PHP build needs IMAP support for this method to function correctly.

  1. On your mail server create a unique email account for each support department. This must be full inbox alias email is not supported.
  2. Navigate to Setup->Support->Departments for each department add your IMAP credentials, click test IMAP connection to test if the connection is successful and your credentials are good.
  3. Follow the test steps mentioned below.

Gmail IMAP Auto Import Notes

  1. If you are using google apps account make sure you verified your domain name.
  2. If you are using google apps account make sure you enable IMAP.
  3. If you get connection refused while testing IMAP connection check that your server’s firewall isn’t blocking traffic to Google.
  4. Make sure you have enabled less secure apps
  5. For IMAP server try imap.gmail.com
  6. Check encryption SSL

To control/block any spam emails you should visit Setup->Support->Spam Filters.


Testing the Email Piping

If you are using the IMAP auto importing tickets method you will need to wait 5 minutes the cron job to run.

After you set up, try sending some test email. If everything is good a new ticket will be opened inside the CRM. While testing you should not use your or any staff address to send a message.

Staff email addresses are only for ticket replies only and you cant create a new ticket with staff email.

Should a ticket not be created when sending in an email, then check in Utilities > Ticket Pipe Log. If the message was received by Perfex it will be listed here with the reason why it failed to create a ticket. If the message you sent is not listed here, then the forwarder you set up previously is not working correctly and Perfex didn’t receive the message.

If you get the error message “Ticket ID Not Found” this means you are trying to open a support ticket from your staff email address.

Staff can only reply to tickets, not open new ones so submit a ticket from any other email address and it should be accepted.

Known problems you can encounter

If an email has not been piped into the ticket system the first reference point is Utilities > Ticket Pipe Log. This shows all the emails processed by the Perfex email piping process and any errors that may have occurred, explanations of the three most common errors are below:

Ticket ID Not Found

This means you are using an email address assigned to staff to send your email. Staff can only reply to tickets and cant open new tickets sending an email to the support emails.
If you want to test, you must send an email from an email address that is not assigned to staff into Perfex.

Only Replies Allowed by Email

The log means that an email was received to the department email address, but the subject did not contain a ticket ID. If you have set to Yes Only Replies Allowed by Email option located in Setup -> Settings -> Support->Email Piping config the email is rejected from the system.

Inline attachment not included in ticket body (cPanel forwarder method)

Sometimes it’s not possible for us to fetch the inline attachments from the email body and include in the ticket. Only regular attachments will be imported.

New Tickets/Replies are Imported Twice

Make sure that you are not using IMAP and cPanel forwarder method together, you should either use IMAP OR cPanel forwarder to auto import tickets.
If you are using the pipe.php (cPanel forwarder method), can you navigate to Setup->Support->Departments and make sure that in your departments the IMAP host and password are blank.

Staff members not receiving an email when a new ticket is created or reply is posted

Click here to read more about the reason why this is happening.

Troubleshooting

If an email has not been piped into the ticket system and it is not listed in the Utilities > Email Pipe Log then these steps can be followed to identify the cause of the problem. There are different procedures depending upon whether the email forwarder piping method is used.

No Log outputted in the Email Pipe Log or Getting Mail Delivery

If no email pipe log when sending an email to your piped email address then the forwarder entry is not correct and the message is not being sent to the pipe.php file.

To correct this, first ensure the pipe.php file is chmod to 755.

If still not working try one of the following commands:

/usr/bin/php -q /home/username/public_html/crm/pipe.php 
/usr/local/bin/php -q /home/username/public_html/crm/pipe.php 
    • Related Articles

    • Auto Close Tickets

      Our CRM offers you the ability to auto close inactive tickets for a certain time. This option is located in Setup->Settings->Cron Job->Tickets, you can enter time number of hours that must be passed from the last ticket reply in order the system to ...
    • Ticket Email Templates

      You can easily customize all ticket email templates by going to Setup -> Email Templates -> Tickets Here is a list for all ticket email templates: New Ticket Opened (Opened by staff, sent to customer) – (Sends to customer when ticket is opened from ...
    • Email Templates

      To set up email templates navigate to Setup -> Email templates and change the content according to your needs. You can set up a general email signature in Setup-> Settings-> Email, this signature will be used on all email representing your company. ...
    • Allow access to tickets to non-staff members

      By default access to tickets to none staff members will be disalowed. If you need want to allow access go to Setup->Settings->Tickets and set Allow access to tickets for none staff members to YES
    • Send Invoice to Email

      Our CRM has the option to send this invoice to a customer which is related. Also, the PDF invoice will be attached to the email. If you want to do not attach the PDF invoice simple uncheck the checkbox Attach Invoice PDF After sending the invoice to ...