A module for performing email related functions
Closes a mail folder.
$mail-folder-handle | The mail folder handle retrieved from mail:get-mail-folder() |
$expunge | A boolean that specifies whether to expunge the folder on close. |
Closes a mail store.
$mail-store-handle | The mail store handle retrieved from mail:get-mail-store() |
Closes a message list.
$message-list-handle | The message list handle retrieved from mail:get-message-list() or mail:search-message-list() |
Opens a mail folder.
$mail-store-handle | The mail store handle retrieved from mail:get-mail-store() |
$foldername | The name of the folder to open |
Open's a JavaMail session.
$properties? | An optional JavaMail session properties in the form <properties><property name="" value=""/></properties>. The JavaMail properties are spelled out in Appendix A of the JavaMail specifications. |
Opens a mail store. Host/User/Password/Protocol values will be obtained from the session.
$mail-handle | The JavaMail session handle retrieved from mail:get-mail-session() |
Returns a message list of all messages in a folder.
$mail-folder-handle | The mail folder handle retrieved from mail:get-mail-folder() |
Returns a message list of all messages in a folder as XML. If there are no messages in the list, an empty sequence will be returned
$message-list-handle | The message list handle retrieved from mail:get-message-list() or mail:search-message-list() |
$include-headers | A boolean specifying whether to include message headers |
Returns a sequence of emails as XML. If there are no messages-numbers in the list, an empty sequence will be returned. Please see get_messages_example.xql.
$message-list-handle | The message list handle retrieved from mail:get-message-list() or mail:search-message-list() |
$message-numbers* | The messages to retrieve using the numbers from the message-list '//mail:message/@number' |
Searches messages in a folder. Search terms are of the form <searchTerm type="xxx">...</searchTerm>. Valid types include: not, and, or, from, subject, body, recipient, header, flag, sent, received. <searchTerm type="not"> requires a single nested child search term. <searchTerm type="and"> and <searchTerm type="or"> must have one or more nested child search terms. <searchTerm type="from" pattern="pat">, <searchTerm type="subject" pattern="pat"> and <searchTerm type="body" pattern="pat"> require a pattern attribute and will search for a substring that matches the pattern. <searchTerm type="recipient" pattern="pat" recipientType="to|cc|bcc"> requires pattern and recipientType attributes. <searchTerm type="header" pattern="pat" name="Content-Type"> requires pattern and name attributes. <searchTerm type="flag" flag="answered|deleted|draft|recent|seen" value="true|false"> requires flag and value attributes. <searchTerm type="sent" comparison="eq|gt|ge|lt|le|ne" format="format" date="date"> and <searchTerm type="received" comparison="eq|gt|ge|lt|le|ne" format="format" date="date"> require comparison, format and date attributes. The format string should conform to Java SimpleDateFormat specifications and the date string must conform to the specified format string.
$mail-folder-handle | The mail folder handle retrieved from mail:get-mail-folder() |
$search-parameters | The xml fragment defining the search terms |
Sends an email using javax.mail messaging libraries.
$mail-handle | The JavaMail session handle retrieved from mail:get-mail-session() |
$email+ | The email message in the following format: <mail> <from/> <reply-to/> <to/> <cc/> <bcc/> <subject/> <message> <text/> <xhtml/> </message> <attachment filename="" mimetype="">xs:base64Binary</attachment> </mail>. |
Sends an email through the SMTP Server.
$email+ | The email message in the following format: <mail> <from/> <reply-to/> <to/> <cc/> <bcc/> <subject/> <message> <text/> <xhtml/> </message> <attachment filename="" mimetype="">xs:base64Binary</attachment> </mail>. |
$server? | The SMTP server. If empty, then it tries to use the local sendmail program. |
$charset? | The charset value used in the "Content-Type" message header (Defaults to UTF-8) |