As a web hosting service provider, you have to ensure that you’re able to communicate with your clients effectively and on time. We’ve already seen that several events in WHMCS generate a notification based on various triggers. Invoices, reminders, domain changes, account creation etc. – all of these keep in touch with users via email. Therefore, you need to do everything in your power to make sure that your emails are getting through. What’s the use of sending several notifications if your clients never see them? This is not merely a question of a mail server configuration error. You also want to prevent your emails from getting sent to the user’s spam folder.
Even if the IP address you’re using for your server has not been blacklisted by your user’s email provider, the still a chance that your message will be sent to spam. This is because by default WHMCS uses a technique to send email known as PHP “sendmail”. while this is the easiest way for a program like WHMCS to quickly send email using the server’s resources, its very ease-of-use makes it a preferred mode of attack for email spammers. Therefore, several email servers including public ones like Gmail send email dispatched via this technique directly to the spam folder.
It is therefore necessary to configure WHMCS in such a way that it sends email using a different technique. For us, that means switching to SMTP instead of the PHP sendmail function. To set it up you’ll need access to not only your WHMCS installation, but also to the cPanel account under which WHMCS is functioning. Let’s look at how to set up SMTP for reliable emails:
The main settings are located under “General Settings” via the “Setup” tab on the WHMCS administration dashboard. Clicking this brings up a screen with a large number of tabs, one of which will be titled “Mail”.
Switch to it, and the first field is a drop-down box containing two items:
You can see that the first one is enabled by default. Simply open the drop-down box and choose the second option instead. Now we need to fill in the rest of the details to get SMTP to work with WHMCS.
Log into your cPanel account and under the “Mail” section, search for “Email Accounts”. This will bring you to a screen containing all of the email IDs that you’ve created. Choose the one with which you intend to send emails from WHMCS. In my case, I’ve settled on firstname.lastname@example.org. You can see that it’s present as one item in the list below:
To the right-hand side, you’ll see an icon titled “More”. Clicking this brings a drop-down box containing two items, one of which will be called “Configure Email Client”. When you click this, you’ll be taken to the mail configuration section containing the details of the SMTP mail server linked to the email ID you just chose.
Ignore the automatic setup scripts for well-known applications and scroll down. We are interested in the SMTP settings as shown below:
The four pieces of information we are interested in from this screen are:
The first one – “Outgoing Server” – is to be placed in the “SMTP Host” field.
The rest of them are self-explanatory. You can of course fill in the rest of the details like the email signature you want to associate with your web hosting account as well as the CSS styling. Once you’ve saved these details, it’s time to see whether our system works or not.
For testing purposes, I logged in as a user and created a random ticket. As we’ve seen earlier, this generates an automatic email notification to the ID of the user who created it. Logging into my email ID, I can see that I have received the notification as shown here:
So there you have it – a proper way of sending email to your clients without being worried that your notifications are being tossed off into the spam folder. This will increase the reliability of your communications and ensure that important deadlines don’t get missed.