I’m having trouble configuring the cron job to allow incoming emails to be transferred to the WHMCS ticket area via an IMAP email account. I have created the email account in Virtualmin and tested it both inside and outside my network and it works fine.
in the WHMCS setup support departments area… i created a support department and assigned that email address to it… Also added the credentials to login like this:
Here is my cron job line as listed in webmin > system > scheduled cron jobs.
php -q /home/userdomain/public_html/shop/crons/pop.php > /dev/null 2>&1
Ticket emails work from within WHMCS and from anyone who emails support outside of WHMCS.
Sample output without the devnull.
POP Import Log
Date: 18/08/2015 14:02:20
Host: localhost
Email: support.userdomain
Mailbox is empty
Host: localhost
Email: sales.userdomain
Mailbox is empty
—"
AS you can see my email is on the same box, so it is localhost. Betting IMAP and port is the problem. Not sure WHMCS does IMAP. Probably will require pop connection to your email server on port 110.
My email settings in WHMCS support dept email is…
hostname = localhost
pop3 port = 110
email address = support.userdomain
password = the password
If you’re having problems, you may want to call the PHP scripts via the web, rather than from command line PHP… using the command line, it won’t use your user’s php.ini file without some further parameters.
An easy solution would be to use a tool such as wget or curl, and call those scripts using a URL. When accessed through Apache, they’d have a different environment, which include their correct php.ini file.