Difference between revisions of "OS4X plugin mail to recipient"

From OS4X
Jump to navigation Jump to search
 
Line 2: Line 2:
  
 
== Purpose ==
 
== Purpose ==
 
+
This plugin sends an HTML information email to the recipient of an OS4X Enterprise job. The information is based on the XML file transferred.
This plugin sends an HTML information email to the recipient of an order. The information is based on the XML file transferred.
 
  
 
== Requirements ==
 
== Requirements ==
 
 
* File <code>/etc/os4x.conf</code> or configuration file referenced by environment variable <code>$OS4X_CFGFILE</code>
 
* File <code>/etc/os4x.conf</code> or configuration file referenced by environment variable <code>$OS4X_CFGFILE</code>
 
* Program <code>xsltproc</code>
 
* Program <code>xsltproc</code>
Line 14: Line 12:
  
 
== Configuration ==
 
== Configuration ==
 
 
This plugin is a script, which is therefore easy to edit.
 
This plugin is a script, which is therefore easy to edit.
  

Latest revision as of 08:26, 29 July 2024


Purpose

This plugin sends an HTML information email to the recipient of an OS4X Enterprise job. The information is based on the XML file transferred.

Requirements

  • File /etc/os4x.conf or configuration file referenced by environment variable $OS4X_CFGFILE
  • Program xsltproc
  • XSL transformation file (send_email.xsl)
  • installed and configured mail transfer agent
  • os4x_extract_recipient_email_from_xml

Configuration

This plugin is a script, which is therefore easy to edit.

The variables that usually need to be configured are defined in the head of the script:

XSL_FILE=/opt/os4x/plugins/send_email.xsl
MYSQL=/usr/bin/mysql

Return codes

  • 0: everything OK
  • 2: error calling program os4x_extract_recipient_email_from_xml
  • 3: Email address cannot be determined
  • other values: return code of xsltproc