EMAIL Maker

EMAIL Maker Manual · Chapter 6

Editing email templates – EMAIL Maker for Vtiger CRM

The editing of the email templates in the EMAIL Maker is easy and is provided inside editing area in EditView. Before you start creation of the new template, you have to decide whether the new email template will be based on primary module or not. So two kinds of email templates exists:

6.1 Create new email template

As was already described in the chapter How to start EMAIL Maker, you can initiate creation of the new email template via button Add template button – Create new email template in the ListView. In case you have no templates at all, also link Create New Template can be used.

Add new email template
Add new email template

The list of email themes will appear on the screen. These themes don’t contain module related fields; it means that they are available for any module. In order to continue, please select one theme according to your needs.

Email themes
Email themes

After selection of the email theme you will be redirected to EditView (chapter EditView). For new template it is necessary to define “Template name”. Although “Description” is not required, it is recommended to describe here main purpose and properties of the template for future edit or re-usage. The subject of the email is not necessary to be defined within template but please notice that subject will be required before sending emails.

New template creation
New template creation

Please continue here with editing template by using CK Editor, inserting images, tables, product blocks, related blocks or listview blocks according to your needs. CK Editor allows you to change formatting of your text and other inserted fields using a lot of toolbars. Just select the text/field and click on any icon of the tool like font, color, bold, italic, alignment etc.

When you finish please save the email template using Save button – Create new email template button.

Please refer to following chapters related to details about editing email templates and using available fields or blocks in your email templates.

6.2 Add theme

The creation of the EMAIL Maker template consists of email theme selection. Although you can start with blank template, it is also possible to select one of predefined themes or create your own EMAIL Maker theme. In order to create new theme click on Add theme button – Add theme in the ListView, or click on Add template button – Add theme and then select Add theme button – Add theme. In the window List themes you can edit, duplicate or delete your own templates using Add theme other buttons – Add theme icons.

How to create new email theme
How to create new email theme

The intention of the using themes is to have same email design i.e. background logo, greetings, type of font etc. and it doesn’t matter for which purpose/module the mail is sent.

In addition the email themes save your time for creation of the new email template. You don’t need to start creation from the blank template but simply reuse already done steps.

Please note that the email themes are common for all email templates, i.e. they don’t contain module related fields. Therefore the EditView of Email theme consists of following tabs (see picture):

  • Properties (please refer to Properties for details regarding fields)
  • Other information (please refer to Other information for details regarding fields)
  • Labels (please refer to Labels for details regarding fields)
  • Settings (please refer to Settings for details regarding fields)

Using above mentioned tabs and related fields, images, tables, etc. you can simply create your own theme. This theme can be reused anytime for your new email templates.

EditView of Email theme
EditView of Email theme

6.3 Inserting images

Images can improve the design of your email templates. CKEditor is used inside the EMAIL Maker and it allows you to add images into your email templates in an easy and intuitive way. So, if you would like to insert image please provide following steps:

  1. Press the image button Add button on the toolbar.
  2. A pop-up window called “Image Properties” will appear. It includes four tabs that group image options.
  3. Define the URL address of the image. You may also use button Browse server button – Inserting images in order to browse the files. Set up other properties of the image.
  4. Click Ok button to add image into template.
Insert image
Insert image

For more info visit following site: https://docs-old.ckeditor.com/CKEditor_3.x/Users_Guide/Rich_Text/Images

6.4 Creating tables

The tables are inseparable component of many documents. Similarly to images, tables can be inserted into your templates in few simple steps:

  1. Press the insert/edit table button Creating tables on the toolbar. After that a popup window called “Table Properties” will appear.

    Creating tables
    Creating tables

  2. Set the basic table properties like number of columns and rows, width, height, etc.
  3. Click on Ok button button.

After that the table is inserted into the template and you can write some text, insert all available fields from chosen and related Modules or add some images into the new table. You can also make some design adjustments like bold text, underline, etc.

For more info visit following site: http://docs.cksource.com/CKEditor_3.x/Users_Guide/Rich_Text/Tables

6.5 Using a product blocks

The product blocks are simple but powerful parts of your email templates. They are used to display all products/services from modules Invoices, Quotes, Sales Order and Purchase Order in your emails regardless of the number of products/services for particular record. Below you can find simple example where invoice contains three products which are automatically seen in the final mail. You don’t need to create template for three rows in the table, just define start and stop of the product block and product fields according to your needs. Next chapter describes how to create your own product block. In addition, we also introduced some default product block templates as well as tool for managing them (Product block templates).

Product block usage
Product block usage

6.5.1 Create new product block

You can find Product block tab in EditView which allows inserting, editing and creating of product blocks. In case that product block templates are not sufficient for you, it is easy to create your own product block:

  1. Go to Product block tab and insert product block start variable (#PRODUCTBLOC_START#) and
    product block end (#PRODUCTBLOC_END#).
  2. Add all necessary product/service fields according to your needs between (#PRODUCTBLOC_START#)
    and (#PRODUCTBLOC_END#) and provide formatting if needed.
Create product block
Create product block

6.5.2 Create separate Block for Products and for Services

There is also the option to create a separate Block for Products and for Services. To create separate Block please provide following steps:

  1. Go to Product block tab and insert product block start variable (#PRODUCTBLOC_PRODUCTS_START# or #PRODUCTBLOC_SERVICES_START#) and product block end (#PRODUCTBLOC_ PRODUCTS_END# or #PRODUCTBLOC_ SERVICES_END#).
  2. Add all necessary product/service fields according to your needs between (#PRODUCTBLOC_PRODUCTS_START# or #PRODUCTBLOC_SERVICES_START#) and (#PRODUCTBLOC_PRODUCTS_END# or #PRODUCTBLOC_SERVICES_END#) and provide formatting if needed.
Separate Blocks
Separate Blocks

6.5.3 Insert and edit product block template

There are already created product block templates which you can insert from product block tab and later edit if needed. These templates are available only for modules Invoices, Quotes, Sales Order and Purchase Order that displays product block. The product block templates created within product block tool (9.3) can be added in the same way. You can simply add the whole product block template into your template by:

  1. Go to Product block tab.
  2. Select product block template.
  3. Click on Insert in to template button button.
Insert product block template
Insert product block template

When the product block template is inserted you can modify it according to your needs. For example you can add new cells / rows / columns, change font, change the background color, etc. You can edit layout like a table or you can add some new variables / labels as well.

6.5.4 Tax & Charges block

With Email Maker, you can also insert into your templates Tax block and Charges block same as for PDF Maker

How to add Tax block (click to open guide)

How to add Charges block (click to open guide)

6.7 Using ListView block

In case you need to send via email the output of the several records within one mail you can use ListView block. Within this block you can simply set which fields of the records you would like to send. Please refer to below picture which shows simple example of the email consists of list of invoices and related few fields (invoice number, invoice date, status etc.) and how to prepare it. Firstly in the Email Maker EditView:

ListView block - EditView
ListView block – EditView
  1. Go to Other information tab, check ListView block and select the “Block start” and click on Insert into template button.
  2. Insert fields you would like to have in ListView block ($s-invoice-invoice_no$..).
  3. Insert “Block end” using button Insert into template button.

Provide additional edit steps and save the template. When the template is ready you can use it within ListView (ONLY!) to prepare mail using following steps:

  1. Go to ListView of particular module and select from 1 to N records.
  2. Click on More button – Using ListView block and select Send Emails with EMAIL Maker.
  3. Select ListView block template (recipients, template, language) you can also add PDF Maker template and click on Select button – Using ListView block.
  4. The Compose E-Mail window is shown as well with ListView block to be sent.

Note: Each ListView block has to start with “Block start” (#LISTVIEWBLOCK_START#) and ends with “Block end” (#LISTVIEWBLOCK_END#). ListView block template can be set as default only for ListView; for DetailView it is not applicable.

6.8 Attach documents into templates

The email template can contain attached documents. This feature is useful in case you often need to attach additional documents into your emails. It could save your time or avoid to forget attach important documents.
1. Go to DetailView of the email template and you will see Documents tab.
2. Click on Email maker select document button – Attach documents into templates.

How to attach documents into email template
How to attach documents into Email template

3. Select one or more documents and confirm selection by Email maker add button – Attach documents into templates button.

How to attach documents into email template
How to attach documents into Email template

In case you want to delete the attached document just click on icon Remove document button

How to remove documents from Email template
How to remove documents from Email template

6.9 Inserting labels

The intention of the labels is saving time and effort for creating email templates. Using labels provides an easy and flexible way to send emails / or just parts of emails in different languages without necessity to create separate email template per each language. As it was described in chapter Labels, labels can be inserted into templates via Labels tab. In order to insert any global related label or module related label just click on Labels tab, select from dropdown list any label and click on Email maker insert lang button.

Labels tab
Labels tab

Please refer to example below used for sending invoice information. Instead of having two (or more) templates the labels are used as much as possible. For example the label %G_Phone% used in template will be replaced in final mail in german language as “Telefon” and in final mail in English language as “Phone” automatically based on your language selection. So it is not necessary to create duplicate templates for another language, just use labels and select language before Compose email window. The global labels use notation %G_*****% and module labels use %M_*****%.

Inserting labels
Inserting labels

If the global and module related labels are not sufficient for you, it is possible to define self-defined labels. In order to define self-defined please follow instructions described in the chapter Self-defined labels.

6.10 Template settings

6.10.1 Email subject

In All tabs of EMAIL Maker you can find “Email subject” definition. This setup gives you the opportunity to set the email subject according to your needs. You can combine strings, module variables and some standard variables like Current date. Dropdown list for email subject depends on primary module as can be seen below.

Email subject settings
Email subject settings

6.10.1.1 Special characters in email subject

If you are having issues that special characters in the subject are shown incorrectly, it’s because of Vtiger CharSet.

Many languages in the world are using special characters, that’s why it’s important that subject must be shown correctly.

As an example is our Slovak language:

  • Let’s say we need to have a template with subject: Nová služna pre Vás
  • By default, when the email is received, subject is: nová služba pre Vás
  • This is not correct, so how we fix it?

In order to fix it, we need to change the CharSet in two files, please follow next instructions:

  1. Please go to your Vtiger directory, then to the folder: modules/Emails/
  2. Find a file: class.phpmailer.php and around line 48 look for public $CharSet = ‘iso-8859-1’;
  3. Change the: public $CharSet = ‘iso-8859-1’; to public $CharSet = ‘UTF-8’;
    Email Maker for Vtiger CRM Special Characters
  4. Save the file.
  5. Again, go to your Vtiger directory, then to the folder: cron/
  6. Find a file: class.phpmailer.php and same as above around line 48 change the char set:
    from iso-8859-1 to UTF-8
  7. Save the file.

Now your subject will be shown correctly with all required special characters.

6.10.2 Status

You can set status as active or inactive for each template. Please take into account that this can be set separately per logged user, it means this setting is not global. The inactive templates will not appear in the list of available templates in the Email maker window. You can find status of existing templates in:

  • ListView – “Status” column
  • DetailView – Template information
Status in ListView
Status in ListView
Status in DetailView
Status in DetailView

To set Email template as active / inactive you need to use Settings tab in EditView and select status from listbox.

How to set status of EMAIL Maker template
How to set status of EMAIL Maker template

6.10.3 Set as default

The particular EMAIL template can be set as default by a logged user, it means this setting is not global. This default template is specific to that user and to that module. It means that different users can set their own default templates for each module separately. It is possible to define template as default for DetailView and default for ListView separately. You can find status of existing templates in:

  1. ListView – template default for DetailView is marked with text “(default for DetailView)”, template default for ListView is marked with text “(default for ListView)”. If the template is default for DetailView as well as for ListView, then in the template name column text “(default)” is written.
  2. DetailView – Properties tab

The behavior of default templates is shown in the below picture:

  • template default for ListView is automatically selected in Select Email Addresses window
  • template default for DetailView is automatically selected in EMAIL Maker window
  • the template is not automatically selected if not set as default, neither in case only one template exists
Default template visibility
Default template visibility

6.11 Display conditions

Display conditions part allows set conditions when template is shown or hidden. If you want to show template without ban, leave conditions empty. There is option to show template if conditions are true or hide templates if conditions are true. You can set it by choosing Yes if/No if in Displayed tab. In Conditions tab you can choose if you want that all conditions must be met or At least one of the conditions must be met. You can add or delete conditions.

Display conditions
Display conditions
How to set Display conditions
How to set Display conditions

Need help with EMAIL Maker?

Our support team answers questions about installation, templates and settings.