Difference between revisions of "Messages/Emails"

From WHMCS Documentation

(Custom Fields)
(Mailing Lists)
Line 83: Line 83:
  
 
It is possible to create a mailing list using custom client fields. Navigate to '''Setup > Custom Client Field''' and create one called Mailing List (just as an example). The field type Dropdown or TickBox can be used. If choosing Dropdown be sure to enter the Select Options "Yes,No".   
 
It is possible to create a mailing list using custom client fields. Navigate to '''Setup > Custom Client Field''' and create one called Mailing List (just as an example). The field type Dropdown or TickBox can be used. If choosing Dropdown be sure to enter the Select Options "Yes,No".   
 +
 +
[[File:Mailing list1.png]]
 
    
 
    
 
Now on the mass mailing page this will appear as a client filter option, so you may send emails only to clients who have chosen to receive these mailings.
 
Now on the mass mailing page this will appear as a client filter option, so you may send emails only to clients who have chosen to receive these mailings.
 +
 +
[[File:Mailing list2.png]]
  
 
==Email Templates==
 
==Email Templates==

Revision as of 12:18, 1 July 2010

Sending Emails to a Client

One Off Mail

  • Begin by locating the client that you want to send the email to either by searching or locating their name in the clients list and then follow the link through to the client summary page
  • Next, in the Send Email panel, select the New Message option and click Send
  • This will take you to the email composition window where you can enter your message before clicking Send Message

Save as a Template

  • When composing your message, if you think you may want to use it again in the future, you can save it.
  • To do this, tick the Save Message checkbox under the Subject field and enter a name to add it to the Email Templates.

Predefined Templates

  • Predefined templates can be sent on demand for clients, products & domains. Other email types are only sent when specific events occur.

Client Related

  • The steps are the same as the with the One Off Mail above but instead of choosing New Message in the dropdown, you need to choose the template name to send.

Product & Domain Related

  • From the Client Summary page, click the edit icon next to the service or domain you want to send the email related to
  • Now scroll to the bottom of the product or domain details page that gets displayed
  • There you'll see a Send Message dropdown where you can choose the template name and click Send

Customise the Template before Sending

  • There might be some occassions where you want to send a predefined template but make some modifications first.
  • To do this, follow the steps as above but instead of choosing the template name choose New Message.
  • Then on the message composition screen which you are taken to for the new message, scroll to the bottom where you'll see a Load Message dropdown box.
  • From there you can choose the predefined template and load it into the message box ready for you to customise before sending.

Merge Fields

  • In email messages you can enter merge field variables wihch are then replaced at the time of sending automatically with the users data.
  • The merge fields available in your message depend on what type of email you are sending.
  • For example if it's an email related to a client you can include client fields only, but if it's a product related email you could include product details aswell as client fields.
  • The exact list of fields you have available in any email message you are composing are listed directly below the message box with the field description and merge field code.
  • Clicking on the description will insert the merge field at the point of your cursor in the message.

Custom Fields

  • To display client custom fields in the email templates, you can either reference it by it's numerical reference such as {$client_custom_fields.0} for the first field, {$client_custom_fields.1} for the second, etc...
  • Or you reference it by name using the format {$client_custom_field_fieldnamehere}.
  • For fieldnamehere, you need to take your custom field name, convert the name to lowercase and remove anything other than a-z 0-9 chars.
  • For example "VAT Number" would become "vatnumber" and so would be {$client_custom_field_vatnumber} in the email template.
  • The same applies to Product custom fields, however they are referenced by {$service_custom_fields.0} or {$service_custom_field_fieldnamehere}.
  • To loop through and display all the custom fields that apply to a product, you can use a foreach loop like this:
{foreach from=$service_custom_fields item=customfield}
   {$customfield.name}: {$customfield.value}
{/foreach}

Conditional Displays

  • There may be cases where you want to display text in an email only if certain conditions are met. For example you might want to include specific information in a sales support ticket submission so could use the below conditional statement in the Support Ticket Opened email template:
{if $ticket_department eq "Sales"}The sales department is open 9-5pm Monday-Friday so you
will only receive a response between these times. We thank you for your patience.{/if}

Resending Emails to Clients

  • Begin by locating the email you want to resend. You can do this from the Email tab inside a clients profile or the master email log accessed in Utilities > Email Log.
  • Next, click the Resend icon on the message's row that you want to resend
  • The email will now be loaded into the message editor where you can edit the content and add any additional recipients
  • Once you are ready, click the Send Message button to resend.

Mass Mailing

  • Mass Mail allows you to send an email to a group of clients.
  • Begin by going to Clients > Mass Mail
  • You can then choose the criteria you want to filter on in order to select who the email will be sent to
  • By default the email type is General and so you can only filter on the client status criteria
  • If you want to filter on product related criteria you must ensure you set the Email Type to be Product/Service related
  • Likewise if you want to filter on domain related criteria you must set the Email Type to be Domain related

Please Note: When composing the email you will see the full list of clients matching your selected criteria in the To field. This is so you can review who will be receiving it but each email is sent individually and so the receiver will not see any other client's addresses in the To field of the copy they receive.

Mailing Lists

It is possible to create a mailing list using custom client fields. Navigate to Setup > Custom Client Field and create one called Mailing List (just as an example). The field type Dropdown or TickBox can be used. If choosing Dropdown be sure to enter the Select Options "Yes,No".

Mailing list1.png

Now on the mass mailing page this will appear as a client filter option, so you may send emails only to clients who have chosen to receive these mailings.

Mailing list2.png

Email Templates

  • All of the emails that WHMCS sends out to clients can be customised in Setup > Email Templates

Creating Custom Templates

  • You can create your own email templates to serve as custom welcome emails for products or messages you send manually but frequently
  • To do that go to Setup > Email Templates and scroll to the bottom of the page where you will see a Create New Email Template area
  • You can only create email templates for the types you can manually send: General, Product & Domain
  • You should use a unique name for the template so you can identify it in the send message dropdowns. Only admin users will see the name you give it.

Disabling Templates

  • There may be circumstances where you want to disable certain emails from sending.
  • For example you might not want emails to go out when invoices get created, or when a product is suspended.
  • You can do that by following these steps:
  1. Go to Setup > Email Templates
  2. Edit the email template you wish to disable
  3. Check the Disable tickbox in the fields at the top of the page
  4. Save your changes to the email
  • That email will now not send until re-enabled.

Translating Email Templates

You can translate the email templates and WHMCS will send emails in that language if the client chooses it during the order process:

  1. Go to Setup > Email Templates
  2. At the bottom of the page select the language you wish to add from the Add dropdown menu
  3. Edit each email template and a second text area will appear
  4. Translate the email template into the selected language

That's all there is to it. Clients who choose that language will now receive the translated emails.