Troubleshooting System Email

If you encounter errors or issues while sending email to your clients or configuring your mail provider, see the sections below to start troubleshooting and resolve the issue.

You can begin the troubleshooting process for many SMTP-related issues by enabling SMTP Debug for your mail provider in the Mail tab at Configuration () > System Settings > General Settings. This setting

You can also enable SMTP debugging by adding $smtp_debug = true to your configuration.php.
For more information about email features in WHMCS, see Email and Mail Providers.

General Email Issues

You may encounter the following common issues:

Error or IssueExplanationNext Steps
External systems are flagging your WHMCS installation’s emails as spam or rejecting them.This is usually due to the server configuration.Email Flagged as Spam
You see a syntax error when troubleshooting email-related issues.Syntax errors are usually due to invalid code in the email template.Email Template Syntax Errors
Data Not AcceptedThe mail server rejected email. This can occur for many reasons.Data Not Accepted Errors
Error: the single id was not found in responseWhen WHMCS attempted to import the message, it did not exist in the mailbox.Single ID Errors
TypeError: array_search(): Argument #2 ($haystack) must be of type arrayAn invalid value in the Email Marketer rule (a missing billing cycle) causes an error in PHP 8.1 environments only.Could Not Instantiate Errors

Sending Failures

You may encounter the following common issues that prevent mail from sending:

Error or IssueExplanationNext Steps
The system isn’t sending support ticket notification emails.This issue is usually due to a misconfiguration.Unsent Ticket Notifications
The system is not sending product welcome emails.This is usually due to a problem with account creation, or you may not have configured a welcome email.Unsent Welcome Emails
The system is not successfully sending general emails, like client sign-up or order confirmations.This issue is usually due to a misconfiguration.Unsent General Emails
Email sending aborted.This error indicates that an unknown issue has prevented the email from sending. This commonly occurs when there is a configuration issue with the file paths at Configuration () > System Settings > Storage Settings.Sending Aborted Errors
Email Send Aborted By HookThis error indicates that a custom hook has prevented the email from sending.Sending Aborted By Hook
Email sending aborted by configurationThis error indicates that you have set Disable Email Sending to ON.Sending Aborted Configuration
Message Body EmptyA syntax error occurred, preventing the email from sending.Message Body Empty Errors
Sending Failed. Please see documentation.The API command cannot send the specified email template type for the messagename parameter.SendEmail Sending Failure

You may encounter the following common issues with email recipients:

Error or IssueExplanationNext Steps
Administrators receive an email with two To email headers, one of which is to undisclosed-recipients.The email is addressed to the same admin email address in both the To and BCC fields.Undisclosed Recipients
No recipients provided for messageThe client has opted out of receiving this type of email in their Email Notification preferences.No Recipients Errors
The following recipients failedThis error is often due to a misaddressed email.Failed Recipients

You may see certain common issues related to your system mail provider:

Microsoft®

You may encounter the following common issues with Microsoft:

Error or IssueExplanationNext Steps
Connection unsuccessful. Please close this window and try again.The Application (client) ID and Client Secret combination for your Microsoft Entra® ID (formerly Microsoft Azure®) app are invalid.Microsoft Connection Unsuccessful
Failed to Create $app_name application. Error detail URL may not contain a query string.Microsoft Entra apps do not support the redirect URI format in WHMCS.Microsoft Mail Query Errors

PHP Mail

You may encounter the following common issues with PHP mail:

Error or IssueExplanationNext Steps
Call to undefined function PHPMailer\PHPMailer\escapeshellarg()Your system is missing the escapeshellarg PHP extension.Undefined PHPMailer Function Errors
Could not instantiate mail functionYou have selected PHP Mail as your Mail Provider setting.Could Not Instantiate Errors

SMTP

You may encounter the following common issues with SMTP:

Error or IssueExplanationNext Steps
Could Not AuthenticateThe mail server is rejecting the SMTP details that you entered for your mail provider.SMTP Authentication Errors
Could not connect to SMTP host
or
SMTP connect() failed.
This error could indicate incorrect mail provider settings, a problem with the external mail server, or one of several other issues.SMTP Connection Errors
Sender Verify FailedThis error indicates that the sending email address is invalid or does not exist on the SMTP server.Sender Verify Failed Errors
SMTP ERROR: Password command failedThis error occurs because Microsoft no longer supports basic SMTP authentication.SMTP Password Command Failed Errors

Support Tickets

For issues with email piping, email importing, or other support ticket-related email, see Troubleshooting the Support System.

Renewal Notices and Payment Reminders

You may encounter the following common issues:

Error or IssueExplanationNext Steps
The domain renewal link in domain renewal reminder emails is broken.In some PHP server configurations, the system generates the URL for the domain renewal link in domain renewal reminder emails incorrectly.Broken Renewal Links in Emails
The system sent two copies of the same renewal notice or payment overdue reminder email.This issue may be due to the system cron running twice at the same time.Duplicate Invoices

Last modified: December 19, 2024