Customise WHMCS email templates so that each message explains the event and gives the customer a useful next step. Preserve the template's supported variables and the identifiers needed for support replies to return to the correct ticket.
IN THIS ARTICLE
01 Edit and test a template
- Open System Settings and Email Templates. Find the exact message type that the relevant event sends.
- Save a copy of the current subject and body before editing.
- Write a concise explanation, action link and product-specific guidance. Use the merge fields listed for that template type.
- Review sender information, attachments and any CC or BCC recipients where those controls are available.
- Update the intended language variants as well as the default.
- Send a controlled example using representative data, then check the rendered HTML, plain-text readability and links.
02 Keep dynamic content reliable
A product email and an invoice email do not expose identical merge fields. Test optional values and conditional branches with both present and missing data. Link to relevant knowledgebase instructions instead of embedding an entire long setup manual in every welcome message.
WHMCS 9.0 removes support for legacy Smarty constructs. Keep application logic in supported hooks or modules and use the resulting safe merge fields in the template.
03 Example: show an optional service field in an email
Use a Product email template where the merge-field list confirms {$service_custom_field_websitepurpose}. This example assumes you created the Website purpose product field described in the custom-field guide. In HTML view, the optional line can be written as:
{if $service_custom_field_websitepurpose}
<p style="margin:0 0 12px;">
Website purpose:
{$service_custom_field_websitepurpose|escape:'html':'UTF-8':false}
</p>
{/if}
<p style="margin:0;">You can review this service in your client area.</p>
The condition omits the label when the field is empty. The escape modifier treats the value as HTML text. The final paragraph remains in either case.
Test both paths: send one authorised test with Business website selected and another with an empty optional field. Confirm readable output and no unexpanded Smarty text. Keep the existing global header/footer and any required support-ticket subject structure. Do not assume this Product field is available in every Invoice, Domain or Support template.
Common questions
Can the support-ticket subject be freely renamed?
Support templates require a specific sender and subject format for reply routing. Preserve the supported structure and customise the allowed message content.
Why did an edited template not affect a customer's email?
Check whether a product-specific template or the customer's translated variant was used. Also confirm that the event sends the template you edited.
How can staff recover from a broken edit?
Restore the saved working content or use the documented default-template restoration process, then reapply the intended changes in a controlled test.
Review billing deadlines and product promises whenever the underlying service or automation policy changes.