5.23.8.2.5. Send notifications by e-mail

Various events can be reacted to via scripting, including the sending of e-mails.

For the SMTP server, there is ONE central location in the configuration file pappserver.cfg, in the [ SendMailTask ] block.

In addition to the MailHost (server) key, a user name and password can also be configured - if necessary.

Configuration file pappserver.cfg > block SendMailTask > key MailHost

Configuration file pappserver.cfg > block SendMailTask > key MailHost

Examples where the SMTP mail module is used:

  • Part Number Request Dashboard (when new requests are received)

  • PLMsynchro (if processes fail)

  • For health monitoring (when monitored processes reach a critical status)

  • ReportsTask

  • ReportWatcher

  • RunScriptTask

  • SendMailTask

  • etc.

Configure RunScriptTask in the dashboard

Notifications can also be sent by e-mail with RunScriptTask.

Example "RunScriptTask"

Example "RunScriptTask"

  1. Wear the address of the SMTP server in the configuration file pappserver.cfg > block SendMailTask > key MailHost .

  2. Click on the New Task button.

  3. Fill in the task details.

    • Name: can be freely assigned

    • Modules: Select the RunScriptTask module in the list box.

    • script: In the list box, select the desired script. (All under sitesetup/scripts/pappserver are displayed.)

    • arguments: Enter the number of the desired argument.

    • triggerFinishedEvent (optional): Activate the option.

    • customFinishedEvent/customFailedEvent: Enter the custom event.

    • Timetable: Determine when the task should be executed (e.g. an interval of 1 minute).

  4. Click Save.

  5. Activate the script at the top of the list.

  6. Execute the script by clicking on the arrow.

    Execute script

    Execute script

    -> The notification is sent by e-mail.

    Mails received (example)

    Mails received (example)

    Mail content (example)

    Mail content (example)

Configure SendMailTask in the dashboard

Emails can also be sent with SendMailTask.

SendMailTask

SendMailTask

Fill in the input fields:

  • Sender

  • Receiver

  • Subject

  • Template

Finally, activate the task in the list above.