Difference between revisions of "Email Templates"

From WHMCS Documentation

Line 5: Line 5:
 
You can also toggle plain text vs. HTML email sending on a per email basis from the editor page.
 
You can also toggle plain text vs. HTML email sending on a per email basis from the editor page.
  
To view a list of the data that you can include in your emails, click the "Merge Fields" button at the bottom of the editing page.  The merge fields you can use depends upon what the email is related to so you can't always use the fields from one template in another - only those of the same group.
+
A list of the data that you can include in your emails is included in a sector at left of the editing page "Available Merge Fields".  The merge fields you can use depends upon what the email is related to so you can't always use the fields from one template in another - only those of the same group.
 +
 
 +
'''Product/Service Related'''
 +
 
 +
Order ID                       {$service_order_id}
 +
ID                               {$service_id}
 +
Signup Date               {$service_reg_date}
 +
Product Name               {$service_product_name}
 +
Domain                       {$service_domain}
 +
Config. Options            {$service_config_options}
 +
Server Name               {$service_server_name}
 +
Server Hostname       {$service_server_hostname}
 +
Server IP                       {$service_server_ip}
 +
Dedicated IP               {$service_dedicated_ip}
 +
Assigned IPs               {$service_assigned_ips}
 +
Nameserver 1               {$service_ns1}
 +
Nameserver 2               {$service_ns2}
 +
Nameserver 3               {$service_ns3}
 +
Nameserver 4               {$service_ns4}
 +
Nameserver 1 IP       {$service_ns1_ip}
 +
Nameserver 2 IP       {$service_ns2_ip}
 +
Nameserver 3 IP       {$service_ns3_ip}
 +
Nameserver 4 IP       {$service_ns4_ip}
 +
Payment Method       {$service_payment_method}
 +
First Payment               {$service_first_payment_amount}
 +
Recurring Payment      {$service_recurring_amount}
 +
Billing Cycle               {$service_billing_cycle}
 +
Next Due Date       {$service_next_due_date}
 +
Status                       {$service_status}
 +
Username               {$service_username}
 +
Password                       {$service_password}
 +
Custom Fields (Array)  {$service_custom_fields.1}
 +
 
 +
'''Client Related'''
 +
 
 +
ID                             {$client_id}
 +
Full Name                     {$client_name}
 +
First Name             {$client_first_name}
 +
Last Name             {$client_last_name}
 +
Company Name     {$client_company_name}
 +
Email Address             {$client_email}
 +
Address 1             {$client_address1}
 +
Address 2             {$client_address2}
 +
City                             {$client_city}
 +
State                     {$client_state}
 +
Postcode                     {$client_postcode}
 +
Country                     {$client_country}
 +
Phone Number             {$client_phonenumber}
 +
Password                     {$client_password}
 +
Signup Date             {$client_signup_date}
 +
Credit Balance             {$client_credit}
 +
CC Type                     {$client_cc_type}
 +
CC Last 4 Digits     {$client_cc_number}
 +
CC Expiry Date     {$client_cc_expiry}
 +
Language             {$client_language}
 +
Custom Fields (Array)  {$client_custom_fields.1}
 +
Status                     {$client_status}
 +
 
 +
'''Other'''
 +
 
 +
Company Name     {$company_name}
 +
WHMCS URL             {$whmcs_url}
 +
WHMCS Link             {$whmcs_link}
 +
Signature                     {$signature}
 +
 
 +
'''Conditional Display'''
 +
 
 +
You can use conditionals to display text based on other values - for example:
 +
 
 +
{if $client_company_name eq "WHMCS"}
 +
You are from WHMCS!
 +
{else}
 +
You are not from WHMCS!
 +
{/if}
 +
 
 +
{if $client_name}
 +
Hello {$client_name}
 +
{/if}
 +
 
 +
'''Looping through data'''
 +
 
 +
{foreach from=$array_data item=data}
 +
{$data.option}: {$data.value}
 +
{/foreach}

Revision as of 10:18, 29 April 2009

The email templates allow you to customise the messages that go out to your customers when actions occur inside WHMCS. Every email that goes out to a customer can be customised here.

To edit an email template, go to Configuration > Email Templates and click the edit icon next to the template you want to change.

You can also toggle plain text vs. HTML email sending on a per email basis from the editor page.

A list of the data that you can include in your emails is included in a sector at left of the editing page "Available Merge Fields". The merge fields you can use depends upon what the email is related to so you can't always use the fields from one template in another - only those of the same group.

Product/Service Related

Order ID {$service_order_id} ID {$service_id} Signup Date {$service_reg_date} Product Name {$service_product_name} Domain {$service_domain} Config. Options {$service_config_options} Server Name {$service_server_name} Server Hostname {$service_server_hostname} Server IP {$service_server_ip} Dedicated IP {$service_dedicated_ip} Assigned IPs {$service_assigned_ips} Nameserver 1 {$service_ns1} Nameserver 2 {$service_ns2} Nameserver 3 {$service_ns3} Nameserver 4 {$service_ns4} Nameserver 1 IP {$service_ns1_ip} Nameserver 2 IP {$service_ns2_ip} Nameserver 3 IP {$service_ns3_ip} Nameserver 4 IP {$service_ns4_ip} Payment Method {$service_payment_method} First Payment {$service_first_payment_amount} Recurring Payment {$service_recurring_amount} Billing Cycle {$service_billing_cycle} Next Due Date {$service_next_due_date} Status {$service_status} Username {$service_username} Password {$service_password} Custom Fields (Array) {$service_custom_fields.1}

Client Related

ID {$client_id} Full Name {$client_name} First Name {$client_first_name} Last Name {$client_last_name} Company Name {$client_company_name} Email Address {$client_email} Address 1 {$client_address1} Address 2 {$client_address2} City {$client_city} State {$client_state} Postcode {$client_postcode} Country {$client_country} Phone Number {$client_phonenumber} Password {$client_password} Signup Date {$client_signup_date} Credit Balance {$client_credit} CC Type {$client_cc_type} CC Last 4 Digits {$client_cc_number} CC Expiry Date {$client_cc_expiry} Language {$client_language} Custom Fields (Array) {$client_custom_fields.1} Status {$client_status}

Other

Company Name {$company_name} WHMCS URL {$whmcs_url} WHMCS Link {$whmcs_link} Signature {$signature}

Conditional Display

You can use conditionals to display text based on other values - for example:

{if $client_company_name eq "WHMCS"} You are from WHMCS! {else} You are not from WHMCS! {/if}

{if $client_name} Hello {$client_name} {/if}

Looping through data

{foreach from=$array_data item=data} {$data.option}: {$data.value} {/foreach}