SQL Alerter
SQL Alerter is used to send a predefined message based on the result of an SQL query.
Send Email
The Send Email action will execute an SQL Query against a remote database. If the query returns a True result, then your e-mail message will be sent. If the query returns anything other than True, your e-mail message will not be sent. It requires you to provide a sender, one or more recipients, the subject and body text of the message that you want to send, an SMTP server Connection, a target database Connection and a SQL Query string to run against the database.
Alias
All Tasks contain this field. Set an Alias name that is meaningful and memorable as it will appear in the list of Tasks on your Nominode.
Target SMTP Server
SMTP Server access information is stored in a Generic:SMTP:Credentials Connection on your Nominode.
This link contains more information about creating a Connection on a Nominode:
The Generic:SMTP:Credentials Connection has six fields.
- Set the Alias field to something meaningful like "YourSMTPServer as YourUser".
- Set the Username field to a user that has access send messages through the SMTP Server.
- Set the Password field to the SMTP user's password.
- Set the Hostname field to the DNS name of the SMTP server.
- Set the Port field to the port number that your SMTP server is listening on. Most SMTP servers listen on ports 25 and 587.
- Set the TLS Enabled toggle to the On position if you want to use Transport Layer Security to encrypt the data between your Nominode and your SMTP server. Leave it in the Off position, otherwise.
Once the Connection is created, you can select its Alias from the drop down list for the Target SMTP Server field on this Task.
From (Override)
By default, this Task will use the e-mail address associated with the user account specified in the Generic:SMTP:Credentials Connection that you selected as the sender of your message (populating the From and Sent-By headers). If your SMTP server allows those headers to be overwritten, you can specify a different e-mail address to be used, in
myuser@mycompany.com format, in this field. Otherwise, leave this field blank.
To
Type in a comma separated list of recipient e-mail addresses, if more than one, to place in the To header of the e-mail message. The e-mail addresses should be in
myuser@mycompany.com format.
Cc
Type in a comma separated list of recipient e-mail addresses, if more than one, to place in the Carbon Copy header of the e-mail message. The e-mail addresses should be in
myuser@mycompany.com format.
Bcc
Type in a comma separated list of recipient e-mail addresses, if more than one, to place in the Blind Carbon Copy header of the e-mail message. The e-mail addresses should be in
myuser@mycompany.com format.
Subject
Type in a plain text string that you would like to place in the Subject header of the e-mail message.
Message
Type in a plain text string that you would like to place in the Body of the e-mail message. MIME encoded content (like rendered HTML and images) is not supported.
Target Database Connection
SQL Database access information is stored in a Generic:Database Connection on your Nominode.
This link contains more information about creating a Connection on a Nominode:
The Generic:Database Connection has seven fields.
- Set the Alias field to something meaningful like "YourDatabase on YourSQLServer".
- Leave the Engine Type field set to the default value of "mysql".
- Set the Hostname field to the DNS name of the server running the software hosting your database.
- Set the Database Name field to the name of your database.
- Set the Username field to the name of the SQL user that has the desired access to your database.
- Set the Password field to the SQL user's password.
- Set the Port field to the port number that your database server is listening on. MySQL servers listen on port 3306 by default.
Once the Connection is created, you can select its Alias from the drop down list for the Target Database Connection field on this Task.
SQL Query
Type in an SQL query that equates to either True or False. For example, this SQL query tests whether or not a row exists in YourTable with the YourValue column equal to 1000:
SELECT CASE WHEN EXISTS (
SELECT *
FROM [YourTable]
WHERE YourValue = 1000
)
THEN CAST(1 AS BIT)
ELSE CAST(0 AS BIT) END