To send an email you need to determine the type of email message, its recipients, title, and message body. This is done from the Email/SMS Events window, which you can access in this way:
Plain Text Message sends the text of the message as written in the source file or entered in this interface. Data point values will be assigned at the time the message is sent.
HTML Message sends the source file or entry in this interface as an HTML file. Data point values will be assigned at the time the message is sent.
This can be a single email address, or a list of email addresses where each address is separated by a comma. Addresses can be in either of these two forms:
username@datadomain.com
User Name <username@datadomain.com>
Subject Enter the subject of the message.
Body You can use a message from a file, or compose one in the editing box.
Use this file: lets you insert the name of a file that you want to send as the text of your email. This is not an attachment, but rather the body of your message. Press the Section 5.8, “HTML Message Examples”.
button to browse for the file you need. To see some HTML file examples, please refer toUse the following text: lets you write and edit the body of your message. To insert the name, value, timestamp, or quality of the point in the point-picker list, select
, , , or button as desired. Then click the button. The DataHub will insert into your text the point name with the proper syntax for the desired output in the email.If you want to send a message from a file, you can still use the text editor with its convenient interface to create it. Write up the message in the editor, then copy and save it to a file. |
The value, time, and quality attributes of the DataHub points are accessed by using a special syntax. This is applied automatically in the text editor when you press the
button. For your reference, the syntax is as follows:Button | Syntax | Example |
---|---|---|
domainname:pointname | DataSim:Sine | |
<%= $domainname:pointname %> | <%= $DataSim:Sine %> | |
<%= PointTimeString (#$domainname:pointname) %> | <%= PointTimeString (#$DataSim:Sine) %> | |
<%= PointQualityString (#$domainname:pointname) %> | <%= PointQualityString (#$DataSim:Sine) %> |
In this syntax, the special characters are used as follows:
Character | Use |
---|---|
<% ... %> | The enclosed expression will be evaluated by Gamma, the DataHub scripting language. |
$ | Indicates to Gamma that this is a DataHub point name. |
PointTimeString() | A Gamma function that returns the timestamp of a DataHub point in an easily readable format. |
PointQualityString() | A Gamma function that returns the quality of a DataHub point, as a text string. |
# | Protects the DataHub point from being evaluated by Gamma until the function is called. |
Copyright © 1995-2010 by Cogent Real-Time Systems, Inc. All rights reserved.