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 adding the following line to your configuration.php file and then replicating the issue:

$smtp_debug = true;

For more information about email features in WHMCS, see Email.

General Email Issues

You may encounter the following common issues:

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
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
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
You see a syntax error when troubleshooting email-related issues.Syntax errors are usually due to invalid code in the email template.Email Flagged as Spam
Call to undefined function PHPMailer\PHPMailer\escapeshellarg()Your system is missing the escapeshellarg PHP extension.Undefined PHPMailer Function Errors
Connection unsuccessful. Please close this window and try again.The Application (client) ID and Client Secret combination for your Microsoft Azure® app are invalid.Microsoft Connection Unsuccessful
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
SMTP connect() failed.
SMTP Connection Errors
Could not instantiate mail functionYou have selected PHP Mail as your Mail Provider setting.Could Not Instantiate Errors
Data Not AcceptedThe mail server rejected email. This can occur for many reasons.Data Not Accepted Errors
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
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
Failed to Create $app_name application. Error detail URL may not contain a query string.Microsoft Azure apps do not support the redirect URI format in WHMCS if you have set Friendly URLs to Basic URLs.Microsoft Mail Query Errors
Message Body EmptyA syntax error occurred, preventing the email from sending.Message Body Empty Errors
No recipients provided for messageThe client has opted out of receiving this type of email in their Email Notification preferences.No Recipients Errors
Sender Verify FailedThis error indicates that the sending email address does not exist on the SMTP server.Sender Verify Failed Errors
Sending Failed. Please see documentation.The API command cannot send the specified email template type for the messagename parameter.SendEmail Sending Failure
The following recipients failedThis error is often due to a misaddressed email.Failed Recipients
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

Email Piping and Importing

For issues with email piping, email importing, or other support-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: June 14, 2024