WHMCS Troubleshooting tips , tricks and queries part 1 – Mail

WHMCS, being the complicated beast that it is can be somewhat tricky to work with. Some tips and tricks to at least try to identify and mitigate the problem in here. If you’re still seeing issues after trying these, or your problem isn’t covered here, please do contact us! We’re absolutely here to help you work through the problem you’re having.

Mail problems
Mail can be somewhat complicated. Is it being sent? Is it not being sent? There’s one key element in WHMCS configuration that can be used to debug this.  Add the following line to your configuration.php file

$smtp_debug = TRUE;

You’ll absolutely want to make sure this is removed when you’re done here!
This will help you debug where the mail problem is. Output is very, very verbose.

Mail going out, but only in some cases? Check the logs!
As WHMCS is quite templated, if you’re not seeing mail from a certain template (IE: invoices, or domain renewals), check your logs. It’s likely you missed something, or there’s a parse error somewhere that should be examined. You can take a look at the logs by going to admin -> utilities -> logs -> System Activity Log. Right now, you’ll need to look through these logs, search for ‘mail’, but we’ll have an addon out to make that a bit easier to work through shortly.

Mail going out, but not support tickets? Check the server logs!
Since WHMCS sends mail out many times from a user that’s not the authenticated user (ie: you’ve specified support@domain, but are logging in as user@domain), many times the server will not accept this. You’ll want to work with your server admin , or host to get this accepted.

Upgraded to php 5.6, and mail suddenly ‘broke’?
This is a known issue in phpmailer. The reason for this is that php 5.6 now requires the certificate name of the server you’re connecting to to match, and be a verified certificate. So, no more self signed certs for mail servers. Unfortunately, the only workaround for this, at this time is to drop back down to 5.5, or add a verified certificate to your mail service.