Send Message




The Send Message job step type is used to send a new message to an SMTP recipient using the SMTP properties as configured on the agent that owns the job containing this custom job step. 


If a database query is configured the results of the query can be embedded in the email.


This job step type extends basic job step functionality.  For details common to all job step types click here.


In addition to the common attributes shared by all job steps this job step type has the following attributes:


Message Tab:

SMTP Account: The (optional) SMTP email account the message will be sent from.  The Agent email account will be used if not configured.

Message From: The email address (optional) of the account that the message will appear to be coming from.

Message To: The destination address(es) of SMTP recipients.  Separate multiple entries with a semicolon.

Message Reply To: The email address(es) (optional) of the account(s) that replies should be directed to.  Separate multiple entries with a semicolon.

CC: Email address(es) to which you would like to courtesy copy the message. Separate multiple entries with a semicolon.

BCC: Email address(es) to which you would like to blind courtesy copy the message. Separate multiple entries with a semicolon.

Subject: The subject text of the message.

Processing Timeout: The length of time that pasUnity will attempt to transmit the message to the SMTP server before terminating the connection and reporting failure.  The default is 5 minutes.

Attachment: (Optional). This allows a file to be attached to the outgoing message. You may specify a fixed file path for an existing file or use one of the parsing tokens (such as {UNITY-SOURCE-FILE}) to specify a dynamic file path.  If you wish to send multiple files separate the names of the files with a semicolon character or place each filename on its own line.

Send using HTML format: If checked the message will be sent with an alternative HTML view for HTML capable mail clients.  If not checked the message will be sent as plain text.

Include Query Results: If checked a Connection and SQL Script tab will appear that allow you to embed the results of a query in an HTML formatted message.  The query results will be converted to an HTML table injected into the message body where the {QUERY-RESULTS} token is found or at the end of the message if no token is found.

<Body>: This section allows you to specify the contents of the message body.

Connection tab:

          Connection Provider: This is the provider used to connect to the database.  Valid choices include SQL Server, OLEDB, and ODBC.

SQL Server: When selected the SQL Server provider will allow for the execution of queries written in the Transact-SQL language.

Enable Macros: Allows for the use of macro commands in the connection properties.

SQL Server Name: The name of the SQL Server or SQL Server Named Instance to connect to.

Windows Authentication: When checked the connection to SQL Server will be made using the Windows security context of the process that is executing the job. When executed manually this is the context of the interactive user. When executed automatically this is the security context of the pasUnity Processor Agent.

SQL Server Authentication: When checked the connection to SQL Server will be made using SQL Standard authentication which is comprised of a login name and password pair.

Login Name: The SQL Server login name when using SQL Server authentication.

Password: The password for the SQL Server login when using SQL Server authentication.

Remember Password: This should always be checked when using SQL Server authentication or the job will fail.

Database Name: The SQL Server database to execute the batch in (must exist).

OLEDB: When selected any OLEDB provider installed on the host with a compatible processor architecture may be used and the native SQL dialect of the provider may be used.  Use of the OLEDB provider for ODBC is discouraged in favor of the ODBC native provider.  Use of the OLEDB provider for SQL Server is discourage in favor of the SQL Server native provider.

Connection String: Any valid OLEDB connection string may be provided.  Double-click the yellow connection string text box to open the OLEDB Data Link editor UI which will assist you in writing your connection string through the use of a wizard.

ODBC: When selected any ODBC DSN (Data Source Name) or ODBC connection string can be specified.

Choose DSN:  Clicking this button will allow you to select an existing DSN (Data Source Name) as the connection string.

ODBC DSN Editor: Clicking this button will open the ODBC Data Source Administrator tool that matches the processor architecture that the application is targeted for.

Connection String Help: Opens the online help for crafting connection strings.

Connection String: Any valid ODBC connection string may be provided.

SQL Script tab:

Batch Terminator: This is a keyword used to break the SQL Script up into individual batches of statements to be executed in a single operation.  The default value is GO and when employed should be on a line of code with no other statements or language.

Allow Macros: Check if you wish to transform pasUnity macros and parsing expressions before the batch is executed.

SQL Script: The SQL statements to execute against the provider. Scripts are divided into batches whenever the keyword Batch Terminator is found on a line by itself.  Syntax highlighting may not be perfectly accurate as standards and language elements vary greatly by provider.  To use the Query Designer to interactively develop your query press F4.

After making changes be sure to press the Update button to save your changes.


Copyright © 2024 pasUNITY, Inc.


Send comments on this topic.