5.4. Defining the Email Message

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:

  1. In the OPC DataHub Properties window, select Email/SMS .
  2. In the Configure Email section press the Configure button.
  3. Select the 1. Email tab and configure your email as explained below.

Message Type


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:

Message Content


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 Insert button. For your reference, the syntax is as follows:

Value<%= $domainname:pointname %><%= $DataSim:Sine %>
Time<%= PointTimeString (#$domainname:pointname) %><%= PointTimeString (#$DataSim:Sine) %>
Quality<%= PointQualityString (#$domainname:pointname) %><%= PointQualityString (#$DataSim:Sine) %>

In this syntax, the special characters are used as follows:

<% ... %>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.