Get The Most Affordable Hosting in the World!
Starting at just $1.87/month, Vercaa offers unbeatable pricing for world-class web hosting services.
Fast, reliable, and secure hosting to power your website without breaking the bank. Plus, enjoy a free CDN for faster loading times worldwide!
Get Started Now!The steps below will troubleshoot issues in WHMCS 8.0 and higher. For help troubleshooting WHMCS 7.10 and lower, see Troubleshooting Email Sending Problems.
If your WHMCS installation isn't sending emails or they don't display properly:
- Go to Configuration > System Logs.
- Check the logs for any error messages that occurred at the time of email sending.
![](https://media.screensteps.com/image_assets/assets/006/170/453/original/f36fcbd8-d37e-4719-b37a-be582e78a151.png)
Common Email Sending Errors
When you review the logs, you may see the following common email sending errors:
- Could not instantiate mail function
- Could not connect to SMTP host
- Could Not Authenticate
- Sender Verify Failed
- Syntax Error
- Smarty Error: Not allowed by security policy
- Data Not Accepted
- SMTP connect () failed
Could not instantiate mail function
This error occurs when you have selected PHP Mail as your mail type for the Mail Provider setting. It indicates that, when attempting to send the email, the mailserver rejected it.
The PHP Mail function uses the server's mail()
function, which is not always reliable. It also doesn't generate a friendly error.
Switching to another Mail Provider in the Mail tab at Configuration > System Settings > General Settings is faster, safer method and would allow you to have more descriptive errors when an issue does occur. These other methods are also usually more reliable when sending emails.
![](https://media.screensteps.com/image_assets/assets/003/566/399/original/Screen_Shot_2020-06-02_at_2.41.32_PM.png)
You could also try the following alternative server-side configuration changes that might resolve PHP mail()
issues:
- Install a local mail server (for example, Postfix).
- Ensure that your
sendmail_path
points at the sendmail binary (usually/usr/sbin/sendmail
) in yourphp.ini
file.
On Ubuntu or Debian servers, you may have multiple .ini
files in /etc/php5/mods-available
or other locations.
Could not connect to SMTP host
There are several possible reasons for this error:
- The SMTP settings that you entered for Mail Provider in the Mail tab at Configuration > System Settings > General Settings are incorrect. Check with your system administrator to ensure that you entered the correct SMTP Port, SMTP Host, SMTP Username, SMTP Password, and SMTP SSL Type settings for your mail server.
![](https://media.screensteps.com/image_assets/assets/006/170/455/original/Screen_Shot_2020-06-02_at_2.48.11_PM.png)
- You're using an inappropriate SMTP Port setting and have selected SMTP SSL Type. For example, selecting SSL and the port number
25
would cause this error. The most common port assignments for each SSL type are:- None —
25
or26
- SSL —
465
or587
- TLS —
587
- None —
- The mail server is blocking connections from the server that hosts your WHMCS installation.
- The server that hosts your WHMCS installation is blocking outgoing connections to the mail server.
Work with your server administrator or hosting provider to resolve these issues.
Could Not Authenticate
This indicates that the mail server is rejecting the SMTP details that you entered for Mail Provider in the Mail tab at Configuration > System Settings > General Settings. Make sure that they are correct.
SMTP restrictions on cPanel & WHM servers will automatically reroute any SMTP traffic back to localhost (the server WHMCS is on). To prevent this problem, navigate to Home >> Security Center >> SMTP Restrictions in WHM and disable the option.
If you are using Google Mail, this could also be due to the security settings in your email account. For more information, see Suspicious access attempt blocking and Allow applications to access your account.
Sender Verify Failed
A Sender Verify Failed error indicates that the sending email address does not exist on the SMTP server.
To confirm this:
1. Log in to cPanel and navigate to Home >> Email >> Email Accounts.
![](https://media.screensteps.com/image_assets/assets/006/170/457/original/877fe477-0a22-4455-8404-8121da5bd746.png)
2. Note the email accounts on this page:
![](https://media.screensteps.com/image_assets/assets/006/170/459/original/4f66f5e1-2d1d-4f44-9432-337162138696.png)
3. In WHMCS, go to Configuration > System Settings > General Settings.
4. Verify that Email Address matches one of the email addresses that you saw in cPanel.
![](https://media.screensteps.com/image_assets/assets/006/170/461/original/56d59d75-ecf8-4a57-a310-ec8354864b64.png)
Syntax Error
Syntax errors are usually due to invalid code in the email template.
The error in Configuration > System Logs provides the following debugging information:
- The error.
- The line number of the invalid syntax within the email template.
- The code surrounding the error.
![](https://media.screensteps.com/image_assets/assets/006/170/463/original/a1cc8b96-1d42-45e5-9aed-115463726134.png)
To resolve the error, go to Configuration > System Settings > Email Templates and click on the email template (in this example, the Client Signup Email template).
![](https://media.screensteps.com/image_assets/assets/006/170/465/original/c04bd6ab-cfd2-4cac-8102-0da3b3639587.png)
Review the code of the email template and correct any errors.
In this example, an erroneous {if}
is in the email template. Removing it will correct the syntax.
![](https://media.screensteps.com/image_assets/assets/000/277/325/original/87016017-486e-4f1c-8d8c-ddcae7dc1f56.png)
Click Save Changes.
Smarty Error: Not allowed by security policy
A Smarty Security Policy Error indicates that the email template contains advanced code that the default email security policy blocks.
Review the code in the email to confirm what it's trying to send at Configuration > System Settings > Email Templates. Then, add an exception to the email security policy to allow the desired code.
For a more detailed explanation of the security policy and instructions for adding an exception, see Smarty Security Policy.
Data Not Accepted
A Data Not Accepted error occurs when the mail server rejects the email.
- There could be many reasons for this, and you may need to contact your mail server administrator.
- For steps to get more verbose output from your mail server, see Email Sending Issues.
You may see the following common causes for this:
Mail server does not allow different sender addresses and usernames
Some servers require that the From
email address is the same as the authenticated user.
To assess this:
1. Go to the Mail tab at Configuration > System Settings > General Settings.
2. Click Configure Mail Provider. A new window will display.
3. Find SMTP Username and note the current value.
![SMTP Username](https://media.screensteps.com/image_assets/assets/003/837/262/original/Screenshot_2020-10-15_at_12.46.22.png)
4. Close the Configure Mail Provider window.
5. Find System Emails From Email and note the current value.
![System Emails From Email](https://media.screensteps.com/image_assets/assets/003/837/260/original/Screenshot_2020-10-15_at_12.46.43.png)
6. Choose the General tab.
7. Find Email Address and note the current value.
![Email Address](https://media.screensteps.com/image_assets/assets/003/837/264/original/Screenshot_2020-10-15_at_13.03.11.png)
If the values are different, check with your email provider that the SMTP user can send emails with the System Emails From Email address as the sender.
If it cannot, adjust System Emails From Email to match SMTP Username.
The file size of your message is too large
If sending of email with attachments fails, try removing the attachment from the email template at Configuration > System Settings > Email Templates.
If the daily Database Backup is the only email encountering the error, deactivate Email Backup and use FTP Backup or cPanel Backup.
The receiver might be blacklisted or blocked by the SMTP server
Check your server's spam filtering settings.
Email sending rate-limiting has been triggered on the SMTP server
This is the most likely cause if the Data Not Accepted error occurs intermittently with a range of different email messages.
Wait a few hours before sending further emails.
If an email succeeds without any other changes to the WHMCS settings and mail server configuration, contact your mail server administrator to increase the email sending limits for the SMTP user.
Email sending aborted by configuration
In WHMCS 8.1, this error indicates that you have set Disable Email Sending to ON at Configuration > System Settings > General Settings in the Mail tab. The system will log this error every time that you enable or disable this setting.
We recommend that you only enable this setting when you are testing updates or customizations on a development installation or while troubleshooting. For more information, see Disabling Outgoing Mail.
SMTP connect () failed
The full error typically displays with a troubleshooting URL:
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
This error is typically due to once of the following causes:
- DNS failure — The server cannot resolve the supplied SMTP host.
- Firewall block — A firewall rule is preventing the server connecting to the supplied SMTP host.
- Remote SMTP Disabled — The server configuration may prevent the use of external SMTP servers.
- SSL Certificate Misconfiguration — A certificate on the hostname certificate on the SMTP server may be expired.
To identify the specific cause, follow the advanced troubleshooting steps to enable verbose output of the SMTP connection.
No recipients provided for message
The client has opted out of receiving this type of email via their Email Notification preferences.
To receive this email, the corresponding Email Notification preference must be enabled for the user or one of the client's contacts.
- You can manage the client's preferences in the Profile tab of the client's profile.
- You can manage contact preferences in the Contacts tab of the client's profile.
In this example, attempting to send a Product Welcome Email would result in a No recipients provided for message
error because Product Emails is unchecked in both the Profile and Contacts tab.
![Client Profile Tab](https://media.screensteps.com/image_assets/assets/006/170/467/original/a3cd77be-db6b-452f-9d28-4c5818c47c20.png)
![Client Contacts tab](https://media.screensteps.com/image_assets/assets/006/170/469/original/e4c1dc58-a882-4b48-9885-e99118fa2981.png)
To resolve the error, check Product Emails in at least one location.
The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.