hostInfo
element
and the email message representation as a message
element.
For a quick start see the examples associates with the send(...)
function. For a complete specification read, the description and the
documentation associated with this function.
send
($host-info as element(email:hostInfo), $message as element(email:message)) as empty-sequence()
This function sends an email message from the specified account. |
declare %an:sequential function smtp:send($host-info as element(email:hostInfo), $message as element(email:message)) as empty-sequence()
hostName
child element of $host-info
must have the form:
remote_system_name [":" port] [flags]
. This syntax is part of the
Remote names
syntax defined in the UW IMAP toolkit. The remote_system_name
and
flags
fragments are explained in the section III
of this document.
For example the hostName could look like:
<hostName>smtp.gmail.com:587/tls/novalidate-cert<hostName>
<hostName>[209.85.129.111]:587/tls/novalidate-cert<hostName>
$host-info
parameter could then look like this:
<hostInfo> <hostName>smtp.gmail.com:587/tls/novalidate-cert</hostName> <userName>username</userName> <password>password</password> </hostInfo>For a complete of the structure of an email message, see the imported email schema:
http://www.zorba-xquery.com/modules/email
All the data passed to this function does not need to be validated.
The only requirement is that they have a valid format and are in the
correct namespace according to the schema:
http://www.zorba-xquery.com/modules/email
.