WHMCS Error: Email Sending Failed – Invalid System Template Name

The error occur because of custom template director within /whmcs/template.

To resolve the error:

Rename the custom template directory name, it should contain only numbers and letters.

Then go to WHMCS admin panel -> Setup -> General Settings -> General Tab -> Template, re-select template name and click Save Changes.