Difference between revisions of "OS4X plugin mail to recipient"

From OS4X
Jump to navigation Jump to search
Line 1: Line 1:
 
[[Category:Plugins]]
 
[[Category:Plugins]]
  
== Zweck ==
+
== Purpose ==
  
Dieses Plugin sendet eine HTML-Informationsmail an den Empfänger eines Auftrags. Grundlage der Informationen ist die übergebene XML-Datei.
+
This plugin sends an HTML information email to the recipient of an order. The information is based on the XML file transferred.
  
== Voraussetzungen ==
+
== Requirements ==
  
* Datei <code>/etc/os4x.conf</code> bzw. Konfigurationsdatei in der Umgebungsvariable <code>$OS4X_CFGFILE</code> definiert
+
* File <code>/etc/os4x.conf</code> or configuration file referenced by environment variable <code>$OS4X_CFGFILE</code>
* MySQL Client (meistens<code>/usr/bin/mysql</code>, definiert in der o.g. Configfile
+
* Program <code>xsltproc</code>
* <code>xsltproc</code> aus dem libxslt Paket
+
* XSL transformation file (<code>send_email.xsl</code>)
* eine XSL Transformationsdatei (<code>send_email.xsl</code>)
+
* installed and configured mail transfer agent
* ein installierter MTU (z.B. sendmail)
 
 
* <code>os4x_extract_recipient_email_from_xml</code>
 
* <code>os4x_extract_recipient_email_from_xml</code>
  
== Konfiguration ==
+
== Configuration ==
  
Dieses Plugin ist ein Script, welches daher leicht zu editieren ist.
+
This plugin is a script, which is therefore easy to edit.
  
Die meistens zu konfigurierenden Variablen sind im Kopf des Scripts definiert:
+
The variables that usually need to be configured are defined in the head of the script:
 
  XSL_FILE=/opt/os4x/plugins/send_email.xsl
 
  XSL_FILE=/opt/os4x/plugins/send_email.xsl
 
  MYSQL=/usr/bin/mysql
 
  MYSQL=/usr/bin/mysql
  
== Rückgabewerte ==
+
== Return codes ==
0: alles OK
+
*0: everything OK
 
+
*2: error calling program <code>os4x_extract_recipient_email_from_xml</code>
2: Problem beim Aufruf von <code>os4x_extract_recipient_email_from_xml</code>
+
*3: Email address cannot be determined
 
+
*other values: return code of <code>xsltproc</code>
3: eMail-Adresse nicht ermittelbar
 
 
 
andere Werte: Rückgabewert von <code>xsltproc</code>
 

Revision as of 08:25, 29 July 2024


Purpose

This plugin sends an HTML information email to the recipient of an order. 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