Undefined PHPMailer Function Errors


While performing an action that causes the system to send an email, you see an Oops! error page that displays the following error:

Call to undefined function PHPMailer\PHPMailer\escapeshellarg() in /path/to/whmcs/vendor/phpmailer/phpmailer/src/PHPMailer.php:1730

You may also see a Required PHP Extensions attention item at Configuration () > System Health.


The escapeshellarg function is disabled in your server’s PHP configuration.

For more information, see PHP’s escapeshellarg Documentation.


Add the missing extensions to your PHP configuration and then recompile PHP.

Last modified: May 28, 2024