Email Piping
Email piping is configured to create tickets automatically from an email account that is set up on the same server as the server running SupportPal. For example, if SupportPal is installed at www.domain.com/support, emailing piping can typically be used for any email accounts on the domain domain.com. Note that if more than one domain is handled from the same server, they can all be used for email piping.
- Go to Settings -> Tickets -> Departments, and either add a new department by click Add Department, or edit a department's email settings by clicking the name of the department or the pencil icon at the end of the row on which the department name is listed.
- On the Add Department or Edit Department screen, scroll down to Email Accounts.
- Make sure that Email Piping is selected from the drop down menu next to Email Support. Enter the email address you would like to to use for email piping. Make sure that the email server for that account is on the same server as your SupportPal installation.
It is also possible to set up the piping forwarder to consume all email that is sent to it instead of checking the TO address on the email. Toggle the Consume All Email option and the command (step 4) will update accordingly. -
In the peach-colored Email Piping command box, set the path to the PHP executable, if necessary, and verify the path to pipe. Most *nix-based servers can run PHP from any location, since PHP is included on the system path. If you have access, open a shell (typically using SSH) and type "
php
" (without the quotes), and are then given a php prompt, PHP is on your system path, and you do not need to set the path to locate the PHP executable. If pipe is located at/var/www/support/pipe
, then, in the Email Piping command box, you would write:| php -q /var/www/support/pipe
-
Set-up the email forwarder with the command on your server. It should be called whenever an email is received by the mail server.
If PHP is not found on the system path, an error will be returned when you type "php" in SSH. Once you locate the PHP executable, make sure to include that in the Email Piping command. So, if PHP is located at /usr/bin/php, you would write, for example:| /usr/bin/php -q /var/www/support/pipe
php -q
is the PHP command to execute a PHP script from the command line. - Once the proper PHP command has been set, click Submit to enable email piping.
Common Problems
Local Delivery Failed Error Message
If you receive a bounce email containing an error that states local delivery failed when sending an email to your piped address then the forwarder entry is not correct and the message is not being sent to the pipe script.
pipe to |/var/www/support/pipe generated by [email protected] local delivery failed
To correct this, first ensure the pipe
file permissions are set to chmod 755.
Example: Setting Up Email Piping on cPanel
- Set the
pipe
file in our installation root to CHMOD 755. - If you have multiple versions of PHP installed and the system default version is different to the version used for SupportPal, you may need to update the
pipe
file. The hashbang in the first line is changed from/usr/local/bin/php
to/usr/local/bin/ea-phpX
, where the X is replaced with the version of PHP such as "ea-php72". - Login to your cPanel account and click Forwarders under the Email section.
- Click Add Forwarder and type in the address you wish to forward, for example 'support' for '[email protected]'.
- Click Advanced Options, select the Pipe to a program option and type in the path to the file, this will look like
public_html/support/pipe
, then click Add Forwarder. - Save the department with the email address entered and the email support set to Email Piping.
Maintaining on upgrade
On upgrading SupportPal, if unzipping the download, the file permissions are usually reset. You will need to update the file permissions to CHMOD 755 again and also update the hashbang if necessary.
On upgrading SupportPal, if unzipping the download, the file permissions are usually reset. You will need to update the file permissions to CHMOD 755 again and also update the hashbang if necessary.