Send E-mail

This trigger allows the site developer to automatically send an e-mail when a form is submitted. It is an AFTER trigger, and it can be executed after insert/update/delete/custom transactions.

This trigger is accessible from the Application panel, Server Behaviors -> + -> MX Kollection -> Send E-mail -> Send E-mail.

The user interface is divided into three (or four) tabs, depending on the MX Kollection version that you have installed:

You can learn how to configure each of the interface tab in the sections below.

 

The Basic tab

Allows defining the basic e-mail options.

 

To set the dialog box options for the first tab, follow the next steps:

  1. In the From text box enter the sender's e-mail address (the administrator's address). The default option is the one set in your e-mail settings. If you haven't edited it in the InterAKT Control Panel, then your sender's address is nobody@nobody.com.
    You can use the InterAKT Dynamic Data feature to input dynamic data in the corresponding field. You can also type your message template directly, using the InterAKT mark-up language. Text between braces (such as {text}) that will not be recognized as valid mark-up language, will remain as such, without being replaced by anything and without breaking the application code.

    Note:
    If you used a certain sender in your From field and later on apply the same server behavior, wanting to go back to the default sender, type in the From text box: {KT_defaultSender} (you will notice that your previous choice will be displayed there due to the user interface persistence). Learn more about the InterAKT mark-up language by reading the description given here.
  2. In the To text box enter the e-mail address to which you want the message to be sent. You can also input dynamic data in that text box.
  3. In the Subject text box type the title/subject that you want the e-mail message to have. The InterAKT Dynamic Data is available here too.
  4. In the Body drop-down menu select one of the two available options: Write content or Retrieve content from file. Depending on your choice, the last field of the interface will differ:


     
  5. In your configuration, if the Body field is Write content, follow the next instructions:

    · In the Content text area type the actual body of the message you want to send. The InterAKT Dynamic Data feature is available for this field. Use it to add data from database fields to the message body.
    · The Insert all fields button offers the possibility of inserting all the database columns in the message content with a single mouse click. You can do this also by using the InterAKT Dynamic Data, but you would have to click on each of the columns in order to add them to the message. Precious seconds of your time are saved by using this button when you need to insert all or most of the columns in the message content.
  6. In your configuration, if the Body field is Retrieve content from file, follow the next instructions:

    · In the File text box enter the name of the file that you want to send as the e-mail body. You can also use the Browse button to select the file (a template file) that contains the actual message content. If the file is located outside the site root folder, it should be copied to the site folder and uploaded to the remote server, in order to be retrieved by the web application. Dreamweaver prompts you to do this. The file is not sent as an attachment, but constitutes the actual e-mail message body.
    The accepted file types are .txt for Text Only messages and .htm, and .html for HTML Text messages.

    Note:
    Any <script> tag will be removed from both Text Only and HTML Text messages. Database field names can be used in the message body by inserting them between braces. In the actual e-mail message, they will be replaced by the corresponding contents from the database. For instance, "Dear {firstname}" will be replaced by "Dear John".
  7. The three buttons in the top right corner of the interface offer you the next functionalities:
    · Click OK when you are done configuring the trigger.
    · Click Cancel to exit without applying the new settings.
    · The Help button opens this help page.
    These buttons are common to all three tabs of the Send E-mail trigger interface.
  8. Click on the Options tab to continue with configuring the trigger.

 

The Options tab

Define the e-mail format, carbon and blind carbon copies and importance.

 

 

To set the dialog box options for the second tab, follow the next steps:

  1. In the Cc text box enter the e-mail addresses to which you want carbon copies of the respective message to be sent (the list of e-mail addresses will be seen by all those who receive the message);
  2. In the Bcc text box enter the e-mail addresses to which you want blind carbon copies of the respective message to be sent (the list of e-mail addresses will be invisible to each of those who receive the message).
    Note:
    In the To, Cc, and Bcc fields you can also enter multiple e-mail addresses, separated by commas.
  3. The Format radio buttons offer two types of e-mail messages from where you can choose: HTML Text and Text only. The first option is the default one. Text only messages are stripped of all formatting and HTML tags.
  4. In the Importance drop-down menu select one of the three available options that indicate the message priority: Low, Normal, High. By default, the Normal option is selected. Recipients who use an e-mail client (such as Outlook Express) are able to sort messages by priority.
  5. In the Encoding drop-down menu select one of the three encoding types: ISO-8859-1, UTF-8, and None. By default, the ISO-8859-1 option is selected.
 

The Attachments tab

 

This tab of the user interface is only available in the MX Kollection 3 Professional version and allows the user to select files that will be sent with the e-mail message as attachments.

 

 

Configure the user interface options as shown below:

  1. The Attachments grid displays all of the attachment rules defined for the current server behavior. You can add and remove attachments by using the Plus (+) and Minus (-) buttons on top of the grid. Fill in each rule's options by selecting it in the grid and filling in the fields below.

  2. In the Folder field enter the relative path to the folder storing the file(s) you wish to send. You can use the Browse button to select the folder from the site structure. The path to the folder will be displayed relative to the current document.

  3. In the Field drop-down menu select which of the transaction field stores the file name. If not using a recordset, or using a custom naming, select the None: Rename rule option.

  4. In the Renaming rule text field enter the name of the file to attach. This field is enabled only when using the Rename rule option, and allows you to enter static and dynamic data which will compose the name of the file. You can either enter InterAKT Mark-up directly or use the InterAKT Dynamic Data icon to visually select it.

 

The Advanced tab

On the last and optional tab of the user interface, configure the trigger properties: transaction to attach to, priority and when to execute it.

 

 

For instructions on completing this step, see the Advanced tab.