Create Email Templates

To create an email template, go to the Email templates repository (Main menu → Repositories → All Repositories Independent objectsEmail templates) and click the New button.

You need to:

  1. Add a new object to the Email templates repository. Make sure you specify an Email subject in the Properties Window of an object.
  2. Develop an email body (see the Email Template Body article for details).
  3. Add attachments (see the Email Template Attachments article for details).
  4. Setup correct connection settings (see the Connection Settings article for details).

Email Template Body

The email body is taken from the Email body template property. This property contains a report template. See the reports article to learn more about report templates.

In case the email body is a static text, you need to:

  1. Create a report template (see types_report).
  2. Type the required text in it.
  3. Specify this report template in the Email body template property.

If you need to add some object data into the body of the email template (e.g. Last name of the recipient), then:

  1. Create a report template (see types_report).
  2. Configure bindings and customize the report template.
  3. Specify this report template in the Email body template property.

As a result, a report is generated for an object (for which an email notification is being sent out) and is substituted in the email body.

Attention!  The data is substituted correctly if the class you select for the report template and the class of the object (for which the email notification is being sent out) coincide.

Email Template Attachments

Email attachments are created in the Attachment files repository (Main menu → Repositories → All Repositories → Independent objects → Attachment files) and are then attached to email templates on the Attachments tab of the Email template Properties Window. You can attach several files at once, if needed.

Attaching Static Files

To attach a previously created static file (e.g. "test.txt"):

  1. Open the Attachment files repository and add a new attachment file.
  2. Open the Attachment file Properties Window.
  3. Select Report template as the Attachment source type property.
  4. Specify the report template you want to use as an attachment in the Report template property.
  5. Save your changes.
  6. Open the Email templates repository. Select the required template and open its Properties Window.
  7. Click the button in the new list row on the Attachments tab.
  8. Select the "test.txt" file in the opened window. The file will appear on the Attachments tab.
  9. Save the email template.

Before the email notification is sent, the report will be generated based on the selected report template and attached to the email.

Attaching MS Excel Table

In order to attach a table generated based on a dynamic filter, to an email:

  1. Open the Filters repository (Main menu → Reports → Filters) and create a new filter with the "Table window" result view (see the Filters article for details).
  2. Open the Attachment files repository and create a new attachment file.
  3. Open the Attachment file Properties Window.
  4. Select Filter in the Attachment source type property.
  5. Specify the required filter in the Filter property.
  6. Save your changes.
  7. Open the Email templates repository. Select the required template and open its Properties Window.
  8. Click the button in the new list row on the Attachments tab.
  9. Select the filter in the opened window. The filter will appear on the Attachments tab.
  10. Save the email template.

Before the email notification is sent, the selected filter will be run. Its results will be saved as the MS Excel Table and attached to the email.

If you need to impose restrictions (e.g. to substitute a Person from whom the email notification is being sent out into the filter property), refer to Configuration of filter mappings for attachment files.

Configuration of Filter Mappings for Attachment Files

To configure filter mappings for an attachment file, open the Filter mappings Window (Attachment file Properties WindowActions button → Open Object ListsFilter mappings). Configuration of filter mappings here is similar to Configuration of filter mappings for the reports template (see the Binding data filter configuration article for details).

Connection Settings

To manage Connection settings, open the Connection settings repository (Main menu → Repositories → All RepositoriesIndependent objects → Connection settings).

Object of this repository is the value of the Connection settings property in the Email template Properties Window.

Refer to your Mail Server Network Admin or to the Internet provider to learn the required information on connection settings (e.g. address and SMTP server port).

« PreviousLevel upNext »
Driven by DokuWiki