Knowledgebase

Displaying Custom Fields in Emails

To display custom fields in WHMCS emails, you'll need to use merge fields. Merge fields allow you to dynamically insert information from your WHMCS database into email templates. Here's how you can do it:

  1. Log into WHMCS:

    Access your WHMCS admin panel using your administrator credentials.

  2. Navigate to Email Templates:

    • Go to "Setup" in the top menu.
    • Click on "Email Templates."
  3. Edit the Email Template:

    • Locate the email template you want to edit and click on its name.
  4. Insert the Merge Field:

    • In the email template editor, place your cursor where you want the custom field value to appear.
    • Insert the merge field by using the following syntax: {$customfield_name}. Replace customfield_name with the actual name of your custom field.

    For example, if your custom field is named Company Name, the merge field would be {$company_name}.

  5. Save Changes:

    • Click the "Save Changes" button to save the modified email template.
  6. Test the Email:

    • You can send a test email to yourself to see how the custom field will appear.

When you send an email using this template, WHMCS will replace the merge field with the actual value of the custom field for the respective client. This allows you to include client-specific information in your emails.

Keep in mind that the custom field must be associated with the client or order for it to be available in the email template. Additionally, ensure that the custom field has a value for the specific client receiving the email.

Remember to also test the email to make sure the merge field is properly replaced with the actual custom field value before sending it to clients.

  • 0 Users Found This Useful
Was this answer helpful?