Skip to content

WHMCS email piping for Support Ticket

WHMCS Email Piping

How to Setup Email Piping in WHMCS via cPanel Email

Email Piping WHMCS

Setting up WHMCS email piping for Support Ticket generation from inbound emails.

Email Piping in WHMCS allows you to receive email messages directly into your WHMCS support department. This allows customers to email you at an email address and rather than need to be connected to that email account, you will receive the messages as a new ticket into your WHMCS ticketing system.

Sounds easy, and it is. But as the title suggests, you do need to pipe using the functions of your cPanel email system.

WHMCS Setup for Email Piping to Support Ticket

Login to your WHMCS system and navigate to:

Setup > Support > Support Departments Screen Shot 2020 08 26 at 12 32 29

If you have not setup a support department yet, then this is the time to set up a department. Within these settings you configure the details of your department name, who can access as an admin user etc.

Note the URL where it say: Ticket Importing using Email Forwarders. This is the URL we are seeking, but not the full URL!

From This: | /opt/cpanel/ea-php73/root/usr/bin/php -q /home/interactivewebs/public_html/invoicing/crons/pipe.php

We take: /public_html/invoicing/crons/pipe.php (copy this section from your URL)

The “invoicing” being the directory we have put the WHMCS install in, and the /crons/pip.php being the file we are seeking to hit with the piping call.

Login to cPanel

From the cPanel dashboard, do a search for “forwarders”

Screen Shot 2020 08 26 at 14 44 55

Click Add Forwarder

Screen Shot 2020 08 26 at 14 45 42

Type in your email address and select the correct domain or sub domain. This can literally be any email address you wish to use. The email address will be the address that people can send to, that will be picked up as a ticket for the support department in question.  Our example below is: supportticket@domain.com

Screen Shot 2020 08 26 at 14 46 44

Click Advanced options:

Paste into the Pipe to a Program box the public_html and everything that follows which we captured from the department link above.

Screen Shot 2020 08 26 at 14 49 07

Add Forwarder and you are almost done.

Testing WHMCS Email Piping

To test the forwarder, we need to send an email, but the from address needs to be an email address that is NOT a user in the WHMCS system and part of the department we configured earlier.

Personally I have a gmail account I use for outbound to inbound email testing and I just generate an email from that to the email address of the forwarder that we created above in cPanel.

Screen Shot 2020 08 26 at 14 53 19

What should happen….

The email goes from gmail, to the email address and is forwarded to the pipe in WHMCS. This then generates a ticket, and if you have it set up, the WHMCS system will auto reply to the ticket with the auto response you crated and the gmail account should get a response in a few minute or so.

You can check the progress of the pipe by looking at the WHMCS pipe log.

WHMCS Utilities > Logs > Ticket Mail Import Log Screen Shot 2020 08 26 at 14 57 51

And it should show you something like this:

Screen Shot 2020 08 26 at 14 59 16

Note the second item here where it says: Ticket ID not Found. This is an example of sending failure. The cause is that the email address I sent the test from is a user in WHMCS. This match of WHMCS email address fails to generate a support ticket as the system cannot match the incident to a customer or existing ticket. Just a WHMCS “thing”. But the correct test on line one was sent from the gmail test.

Troubleshooting

If you do not get a message in the log, then the email has either not been received by your cPanel email system, or the pipe was wrong.

To troubleshoot, you need to first work out if email is being received to the cPanel system. The easy way to test this is to:

  1.  Remove the forward in cPanel
  2.  Create an email account / box for the same email address.
  3.  Send the test again.
  4.  Login to the email account via cPanel and look in the webmail to check the email arrives.

If you do not get the email there, then it is a fair bet that the MX record on your domain is not configured correctly.  Test it via https://mxtoolbox.com to be sure.

If you get the email to the email account in cPanel, then you may need to double check the forward you set up. Set it up again being careful of the address. If you fail again, then have a look at the permissions on the file. There is some help here: WHMCS Help

Contact us if you need support setting up your WHMCS system.

Leave a Reply

Your email address will not be published. Required fields are marked *