Skip to content

Email reporter - installation

The Email reporter basically consists of several modules:

  • Plugin: CortexEngine plugin for configuring reports
  • Scheduler: Python module for sending configured reports by email

Plugin

License required!

The desired CortexEngine instance must have a license with the permission UniplexEmailReporter!

Uniplex plugin required!

This plugin can only be used in the context of the Uniplex plugin!

Tip: In the Starter edition and the User group edition, the Uniplex plugin is already pre-installed.

Remote admin

Plugin

This plugin is installed as usual using the Remote admin.

This is how it works: install plugin

Remote admin overview

  • click the button Apps/Plugins (area 3) in the main window of the Cortex-IP Remote admin

  • the plugin is selected and installed via the buttons Directory Import (for plugin in folder form) or File Import (for plugin as XJZ file):

    Administration plugins

Users

The plugin must also be activated for all desired users.

Required permission: UniplexEmailReporter

This is how it works: set user rights

Remote admin overview

  • click the button User (area 3) in the main window of the Cortex-IP Remote Admin

  • select the desired user in the UserDialog and click the button Edit:

    User select

  • set the desired permissions in the UserInputDialog in the options/applications area:

    User permissions

Uniplex

Plugin template

After installation in the CortexEngine, the plugin must be activated in the Uniplex

must be assigned.

This is how it works: activate in plugin template
  • open the Plugin templates

    Plugin templates

    The button Add Add is used to configure new entries and the button Edit Edit is used to configure existing entries.

  • select the desired template and activate the E-Mail Reporter plugin

    Plugin template editor

    In the dialog header, a template can be created with the button Add Plus and another template can be selected with the button Load template Select. The template will be removed with the button Delete template Delete.

    Parameters Meaning Note
    name meaningful name of the plugin template
    available plug-in buttons plugins available in the CortexEngine activate with Plus
    activated plug-in buttons plugins that should be visible for users with this plugin template remove with Minus
    change order with Up and Down
Field and record type definitions

To be able to manage report configurations in Uniplex, its fields and record types are required.

  • download and unzip the file
  • import the field definitions (in file !FId.json)
  • import the record type definitions (in file #Dst.ctxexp)

Perform import separately

Fields and record types must be imported separately!

This is how it works: importing field and record definitions

The import function is located at the bottom left in the system settings.

It opens the dialog Import configurations.

Import configuration

  1. select the configurations to be imported and confirm with the button Import selected Import

  2. select the file with the configurations you want to import in the File selection dialog

Scheduler

Python Version 3.11

The Scheduler module requires Python version 3.11 or higher!

The Scheduler is a Python-based module that realizes the sending of email reports.

It runs outside the CortexEngine at system level and can either be started manually on demand or regularly via CronJob.

pip install emlrep-scheduler-[version].tar.gz

Example:
pip install emlrep-scheduler-2.0.2.tar.gz
Tip: Add $PATH

To simplify use, it is recommended to add the module to the system path:

  • find installation location
    pip show emlrep-scheduler
    
  • include in $PATH (e.g. .zshrc or .bashrc)
    export PATH="$PATH:[/absolute/path/to/installation/folder]"
    

Configuration

The configuration is carried out via emlrep.ini, which is divided into the following categories.

Dataservice

To be able to read the reports for delivery, the scheduler requires access to the CortexEngine data inventory.

This access takes place via the Uniplex interface:

emlrep.ini
[DATASERVICE]
no_rec_found=Keine Datensaetze gefunden.
link=localhost:8888/Uniplex/updjsr.php
user=admin
password=admin
Parameters Description
no_rec_found requested response if no reports were found
link URL of the updjsr.php in a running Uniplex instance
user login user name of the linked Uniplex instance
password login password of the linked Uniplex instance
Mailserver

A mail server is required for sending emails:

emlrep.ini
[MAILSRV]
hostname=mailserver.cortex-ag.com
user=cron-mailer@cortex-ag.com
passwd=password
from=Emailreport <no-reply@cortex-ag.com>
ssl=0
port=587
Parameters Description
hostname URL of the mail server
user login user name for mail server
passwd login password for mail server
from desired sender address
ssl Should SSL be used for the connection to the mail server? (0 = No, 1 = Yes)
port access port for mail server
Administrator
emlrep.ini
[ADMIN]
error_emails=report.admin@cortex-ag.com
debug=False
cron_interval=day
Parameters Description
error_emails recipient address for administrative/debug emails
debug Should emails be sent to the error_emails recipients and not to the recipients defined in the reports? ('False' = No, 'True' = Yes)
cron_interval How often should the scheduler be executed? ('day' = 1x daily, 'hour' = 1x per hour) (*1)

*1: Hour input in the plugin

If cron_interval = day - i.e. delivery 1x per day - is configured, the hourly input is hidden in the plugin UI.

Configuration - web server

The web server that serves the desired instance of the CortexEngine requires the path to the emlrep.ini file.

This is communicated to the web server in its httpd.ini file:

httpd.ini
[HTTPSRV]
.
.
.
SERVERVAR_EmailReporterINI=/absoluter/pfad/zur/emlrep.ini