Configuring email piping on WHMCS installation has never been easier. Some time your configuration won’t work properly as you expected before. This article covers about how to configuring your WHMCS installation’s Support Ticketing system along with Google Apps Hosted Email Service for Domains.
I’m assumed that you already have your WHMCS installation set up and working properly on your web server. If so then you are ready to go! Follow the steps below!
1. Create a Google App account for your domain
2. Verify your domain for Google App account
3. Log in to your Google App Control Panel for your domain and create appropriate email accounts that will be using WHMCS ticketing system and receiving tickets, ex: [email protected]
4. For all accounts that will be receiving tickets, be sure to enable POP3 and IMAP feature in Google Mail’s webmail interface.
5. Adjust your MX records on your webserver’s DNS manager to redirect your email service to Google.
6. Here’s one of the “gotchas” in getting this set up. You must enable Imap-SSL/Pop3-SSL with your webserver’s php installation. Many times you will need to contact your hosting providers to do this for you. The reason for that is because Google Mail services will only accept secured connections. (or try install php5-imap package) In WHMCS, in support depts, Create a department and configure the email account assigned to it like so:
user: [email protected]
7. In the account you set up in WHMCS in support dept, make sure to go into google settings to enable both IMAP and POP.
8. Set up your cron job within your Web Hosting control panel (Plesk, cPanel, Direct Admin etc.):
*/5 * * * * php -q /home/username/public_html/whmcs/pipe/pop.php
After completing these steps, this should work properly.
There are a few troubleshooting steps one can take in troubleshooting this, if your set up isn’t working properly.
1. Check your ticket import logs in your WHMCS installation: Utilities > Ticket Mail Import Log
What you are looking for here is to see if your Cron Job is attempting any import at all. If you don’t see anything here then your cron job is not successfully attempting a ticket import.
- Verify that, for your Google email account you created, you have enabled both Pop3 and IMAP.
- Verify that you cron job has been created and is running.
- If the cron job is running, view the emails that your cron job is creating (you can configure your cron job to email its results to an email address) and see if an error is being generated.
- If you’re not sure you cron job is running, and in this case you have console account with your hosting, log in to console and then run the pipe file manually, type this command on your console (without quote): “php -q /home/your/whmcs/dir/admin/cron.php” and then see the result. If you get an error message similar to this one:
An Error Occurred: Can’t connect to gmail-pop.l.google.com,995: Connection refused and Host: pop.gmail.com Email: [email protected] An Error Occurred: Too many login failures
- Check that your server’s firewall isn’t blocking traffic to Google.
- To make absolutely sure that your server’s firewalls are not blocking your connection attempts, run this telnet command from your server: telnet gmail-pop.l.google.com 995. If you get an error connection it may your firewall blocking the outgoing port 995.
This can be another “gotcha” as well. Often times this is overlooked by users and, also, server admins. If that command succeeds and no other firewall restrictions are in place, then your connection is unobstructed on your server side.
1. If you are still having issues after verifying the suggested troubleshooting steps above, then you will need to contact google or visit their discussion forums for Google Apps. It is possible they may be blocking your server from accessing their mail servers.
Final thoughts: WHMCS and Google Apps do play well together and it does work, regardless of what version of Google Apps you are using: Standard, Premier or Education. If you get them working together, you’ll be a happy camper. Just be diligent in your troubleshooting.