Summary: this page describes how to configure Console to send out email notifications for "job" (snapshot/analysis) related statuses.

Introduction

Users can be notified via email with regard to the following "job" related statuses:

  • job successfully completed
  • job failed due to an error
  • user manually stopped a job
  • application creation successful
  • new version created
  • etc.

Email notifications are sent to all users with permission to manage an Application in Console.

Requirements

(tick)Access to a local or remote mail server to relay email notifications (Console does not have a built-in mail server)
(tick)Mail server configured to accept mail from Console
(tick)Email address configured and notifications set to active in the user profile. See AIP Console - User Profile options.
(tick)Requires Console ≥ 2.8 or 1.x.

Configuration process

Edit the properties file

Edit the following file located on the Console server with a text editor depending on your chosen deployment method:

≥ 2.x Enterprise edition Windows Installer
%PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-Service-Registry\application.yml

≥ 2.x Enterprise edition individual JAR installers
%PROGRAMDATA%\CAST\AIP-Service-Registry\application.yml

≥ 2.x Enterprise edition Docker installation
<unpacked_zip>/docker-compose.yml

1.x
%PROGRAMDATA%\AipConsole\AipConsole\aipConsole.properties

Locate the following parameters in the file:

.

application.yml

Locate the following parameters in the existing spring: liquibase: parameters: section:

spring:
  datasource:
	...
  # custom liquibase parameter to update properties
  liquibase:
    parameters:
      ...
      SMTP_HOST:
      SMTP_PORT:
      SMTP_USERNAME:
      SMTP_SENDER:
      SMTP_PASSWORD:
      SMTP_TRANSPORT_PROTOCOL: smtp
      SMTP_AUTH: true
      SMTP_STARTTLS_ENABLE: true
      GATEWAY_URI:
docker-compose.yml

Locate the following parameters in the existing services: aip-service-registry: environment: section:

services:
   ...
   aip-service-registry:
   	...
    environment:
      ...
      - SMTP_HOST=
      - SMTP_PORT=
      - SMTP_USERNAME=
      - SMTP_SENDER=
      - SMTP_PASSWORD=
      - SMTP_TRANSPORT_PROTOCOL=
      - SMTP_AUTH=
      - SMTP_STARTTLS_ENABLE=
      - GATEWAY_URI=
aipConsole.properties

Locate the following parameters in the file:

# =============================
# Mail server settings
# -----------------------------
spring.mail.host=
spring.mail.port=
spring.mail.username=
# email address that will appear in the "FROM" field of email sent by AIP Console
spring.mail.sender=
# to encrypt the password use aip-encryption-tool
spring.mail.password=
spring.mail.properties.mail.transport.protocol=smtp
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true

.

Update or add in the entries to match your mail server:

EntryDescription
SMTP_HOST / spring.mail.host

Enter the host name (local server/fully qualified domain name) of your target mail server. For example, for an Office365 mail server:

  • SMTP_HOST: mycompany-com.mail.protection.outlook.com
  • spring.mail.host=mycompany-com.mail.protection.outlook.com
SMTP_PORT / spring.mail.port

Enter the port number used by the target mail server to accept mail. For example:

  • SMTP_PORT: 587
  • spring.mail.port=587
SMTP_SENDER / spring.mail.sender

Enter the "outgoing" FROM email address that you would like to use - this may need to match the requirements of the target mail server. For example:

  • SMTP_SENDER: console@mycompany.com
  • spring.mail.sender=console@mycompany.com
SMTP_USERNAME / spring.mail.username

Enter the credentials required to access your target mail server. If no credentials are required (for example you are using Direct Send or a Connector in Office365) then leave these entries blank. The spring.mail.password parameter will accept either a plain text password (not recommended) or a password that has been encrypted with the aip-encryption-tool.

SMTP_PASSWORD / spring.mail.password
SMTP_TRANSPORT_PROTOCOL / spring.mail.properties.mail.transport.protocolThis entry sets the mail submission protocol to insecure SMTP. Please do not change this entry.
SMTP_AUTH / spring.mail.properties.mail.smtp.authThis entry will force the mail submission to be attempted with the AUTH command. If your mail server does not require authentication, change this entry to false.
SMTP_STARTTLS_ENABLE / spring.mail.properties.mail.smtp.starttls.enableThis entry will force the mail submission to upgrade the insecure SMTP protocol to use TLS or SSL. If this is not required, change this entry to false.
GATEWAY_URI
Only required in Console ≥ 2.x.

Enter the URL to your Gateway Service, i.e. the front-end Console URL used for user access. For the majority this will be http://localhost:8081:

  • GATEWAY_URI: http://localhost:8081

Restart CAST Console and all Nodes

Restart all CAST Console services and any dependent Nodes to ensure the changes are taken into account.

Test the configuration

When the email configuration options have been updated, you should test them as follows:

  • enter an email address in your profile
  • enable notifications
  • run an analysis/snapshot and check that you receive an email notification about the outcome

Troubleshooting

If you fail to receive an email notification, the mail server configuration may have errors preventing the notification from being sent. To check whether an error occurred when the notification was sent, open the following log file with a text editor:

≥ 2.x Enterprise Windows Installer
%PROGRAMDATA%\CAST\CAST-Imaging-Console\AIP-Service-Registry\logs\aip-service-registry.log

≥ 2.x Enterprise Individual JAR
%PROGRAMDATA%\CAST\AIP-Service-Registry\logs\aip-service-registry.log

≥ 2.x Enterprise Docker
Access the "aip-service-registry" container logs using "docker logs <container>"

1.x
%PROGRAMDATA%\AipConsole\AipConsole\logs\webi_error.log

Updating existing settings (≥ 2.x)

The SMTP mail settings defined in the .yml file will be stored in the aip_config schema (which is used to store persistence information for CAST Console) when the Console services/Nodes are restarted, therefore, if you need to update the SMTP mail settings after you have modified the properties files and restarted the Console services/Nodes, then you will need to make the changes directly in the aip_config schema. This schema will be stored on the CAST Storage Service/PostgreSQL instance as follows:

Enterprise edition Windows Installer / Enterprise edition individual JAR installersOn the CAST Storage Service/PostgreSQL instance defined during the Console installation process (specifically for the Service Registry)
Enterprise edition Docker installationOn the CAST Storage Service/PostgreSQL instance provided as a container on Docker (running on port 2285)

Using pgAdmin, connect to the CAST Storage Service/PostgreSQL instance on which the aip_config schema is stored. Locate the properties table and then locate the entries highlighted below:

Click to enlarge

Edit and save the entries in the value column as required, then restart all CAST Console services and any dependent Nodes to ensure the changes are taken into account.