THE INFORMATION IN THIS ARTICLE APPLIES TO:
- EFT Server (All Versions)
Can I define an email template for Event Rules?
The Conditions and Actions for every Event Rule you create, including email notifications, is saved in EFT Server's configuration file. Each time the EFT Administrator connects, it reads in the configuration file. Multiple Event Rules and email notifications can grow the configuration file quite large. If you expect to have numerous email notifications that are basically the same (e.g., you have default text that you always want to appear in the body of the email), you can define the body of the email in an HTML file, then reference it in the body of the Edit Mail Template dialog box.
To create an email notification template
Create an HTML document that contains the text that will be the body of the email notification. You can include any HTML tags and the EFT Server context variables. For example:
<P>This message was sent to you automatically by GlobalSCAPE EFT Server on the following event: %EVENT.NAME%.</p>
<TD>Server Local Time:</TD>
Tip: You could define the email in an Edit Mail Template dialog box to easily add each of the context variables that you want, then copy and paste the body of the dialog box into a text file, and save it with an htm extension. Be sure to include the opening and closing <html> and <body> tags.
(You do not have to format the email with a table. The design of your email is only limited by your knowledge of HTML.)
- Save the file in a location that can be accessed by EFT Server. For example, name the file MailActionTemplate.htm, and save it in C:\Program Files\GlobalSCAPE\EFT. (If you are logging into EFT Server over an Active Directory Site, the Event Rule engine is running as that logged-in user, so the user account must have access to the template.)
Define the Event Rule and add the email notification, then open the Edit Mail Template dialog box.
- In the body of the email, type file:// and the path to the email template, then click OK. For example, type:
IMPORTANT: There can be no spaces or line breaks before or after the link!
Click Apply to save the Event Rule on the Server.
The referenced HTML file will appear in the body of the email that is triggered by EFT Server.