Mail Transfer Script Finalizer

Script Finalizers are plugins, that can run after any Active Job and execute some finale script activities. The BS Mail Transfer Script Finalizer can be configured to run at the end of an Active Job and to create an E-Mail. Often Active Scripts create some downloadable result through so-called Result Log Links. Such Log Links can also be transferred along with the E-Mail created. A typical use case would be to define a Data Flow Export in an automated job and then send the resulting export file to a recipient by E-Mail.

The attachments to such an E-Mail can be linked inline within the E-Mail or also as a download link. The download links can refer to the file on the Contentserv web server or even to a public web server using the new Public Link feature of the BS Skills.

Configuration

The BS Mail Transfer Script Finalizer can be selected as "Post Processing Step" at the "Automation" Tab of any Active Script:


Once selected the following options are available to define the E-Mail sent:


Sending Script Results as Attachments

All results of the script will automatically be attached to the E-Mail, depending on the "Attachment" setting:

Attachments can be sent

  • inline as MIME part within the E-Mail
  • as HTTP link
  • or automatically as a link when the attachments outgrow a limit

Normally mail servers accept attachments at least up to 10 MB.

Often web servers running Contentserv are running behind firewalls protecting them from the open internet traffic. This can make it difficult to send HTTP links to users outside of this firewall. For that reason, the BS Skills provide a concept called "Public Links". These Public Links are created by transferring the linked file first to a public web server using sFTP or SCP and then returning a URL that points to the public URL.

To use such Public Links activate and provide the following settings:

The BS API provides a simple method

that uploads the file to the configured sFTP or SCP server and returns the public URL. If no server is configured or activated the returned URL will automatically be created against the Contentserv server as a fallback.

Using Tokens

The message will normally be created as a default message. It is possible to overwrite the default with a custom message. For all input fields, the following tokens can be used:

Running the Active Script

At the end of the Active Script output log lists the details of the E-Mail created:

If Public Links are configured properly the files to be linked will be uploaded before sending the E-Mail.

The E-Mail created will show the same colors and log as in the Portal Header skin settings: