Database Reference
In-Depth Information
mail
Description
Email-related functions
Namespace
mail="http://exist-db.org/xquery/mail"
Type/default status
Java; enabled in $EXIST_HOME/conf.xml ; enabled in $EXIST_HOME/extensions/
build.properties
Class
org.exist.xquery.modules.mail.MailModule
This module allows you to send and receive email messages using the Java mail libra‐
ries. The following example shows sending a message through a straight SMTP server
(without required authorization):
let $ receiver-email := 'your@email.address'
let $ smtp-server := 'your.smtp.server.address'
let $ message :=
<mail>
<from> E. Mailtester &lt;emailtester@dummy.org&gt; </from>
<to> { $ receiver-email } </to>
<subject> Testing send-email() </subject>
<message>
<text> Test message, Testing 3, 2, 1 at { current-dateTime ()} </text>
<xhtml>
<html>
<head>
<title> Testing </title>
</head>
<body>
<h1> Testing </h1>
<p> Test message, Testing 3, 2, 1 at { current-dateTime ()} </p>
</body>
</html>
</xhtml>
</message>
</mail>
let $ props :=
<properties>
<property name = " mail.smtp.auth " value = " false " />
<property name = " mail.smtp.port " value = " 25 " />
<property name = " mail.smtp.host " value = "{ $ smtp-server }" />
</properties>
let $ session := mail:get-mail-session ( $ props )
 
Search WWH ::




Custom Search