send (mail : nodeset) : string

The general structure of an email and the possible attributes are explained here.

Below is an example structure of an email variable and its subsequent sending.

<xsl:variable name="mail">
<mail mailserver="" subject="" reply-to="">
<sender e-mail="" name="Sender" />
<recipient e-mail="" name="Recipient 1" />
<recipient e-mail="" name="Recipient 2" type="to" />
<recipient e-mail="" name="Recipient 3" type="cc" />
<recipient e-mail="" name="Recipient 4" type="bcc" />
<text>This e-mail has text content</text>
<p> This e-mail hast
content too. </p>
<file xlink="onion://data/objects/1#icon" physical-filename="icon.png" target-filename="onion-icon.png"> </file>
<xsl:value-of select="email:send($mail)" />

The result of the example is: success or error.


The mandatory attribute “mailserver” indicates the sending server for the email. In order to set the subject of the email, the attribute “subject” is set on the mail element. This attribute is also mandatory. If no subject is set, then the attribute “empty” must be set.

If the recipients of the email are not supposed to reply to the email address of the sender, then “reply-to” can be set as the attribute of the mail element.


The sender element is mandatory and may only appear once as the first element below the mail element. “e-mail” is to be set as the mandatory attribute of the sender element. A symbolic name (“name” attribute) can be allocated for the sender as an option. This name is usually displayed behind the email address in email clients.


This element is similar to the sender element. The attribute “e-mail” must be set for each recipient element and the attribute “name” can be set for a symbolic name as an option.

In addition, there is the attribute “type”, which specifies how the recipient is to receive the email. The values to, cc, bcc are possible. If this attribute is not set, then the default value is "to".

If several recipients are to receive this email, then several recipient elements can simply be added for each recipient.


The element “text”, which contains plaintext, can be set as a sub-element of the “body” element. The “html” element can be set after the “text” element as a further sub-element of the “body” element. HTML content can now be contained in the “html” element.
If the email does not contain any text or html content, then the text/html element can be left out.


If one or more file attachments are to be added to an email, then the files are added below the “attachments” element. For this purpose, a file element with the attributes described below is defined for each file to be attached.

“xlink” is to be set as the mandatory attribute for the file element. The xlink must be an XLink to a binary method of the file to be attached. A further mandatory attribute is “target-filename”, which is the display filename of the attachment.

A physical file name can be specified for the file attachment as an option. If this name is not set, then the file name is used which supplies the specified binary method.