WARNING: This server provides a static reference view of the NetKernel documentation. Links to dynamic content do not work. For the best experience we recommend you install NetKernel and view the documentation in the live system .

Endpoint
Name:MailFolderTransport
Description:The MailFolderTransport polls a POP or IMAP account and issues a root request when it detects the arrival of a new email message.
Id:MailFolderTransport
Category:transport

MailFolderTransport is a transport that must be instantiated from a prototype.

Parameters

The MailFolderTransport prototype has the following initialisation parameters:

NameRulesTypingDefaultDescription
configMandatoryIdentifier or XML(none)
XML configuration resource
idOptionalStringnull
An identifier for created logical endpoint, if omitted a unique auto-generated value it will be used.
privateOptionalBooleanfalse
If included this parameter will mark the endpoint as private and it will not be exposed outside module.

Here is an auto-generated example of how to instantiate an instance of MailFolderTransport:

<transport>
  <prototype>MailFolderTransport</prototype>
  <config>XML configuration resource</config>
</transport>
Import Requirements

To use MailFolderTransport transport you must import the module urn:org:netkernel:email:core:

<import>
  <uri>urn:org:netkernel:email:core</uri>
</import>

The MailFolderTransport polls a POP or IMAP account and issues a root request when it detects the arrival of a new email message.

Configuration

The required config parameter provides the specification of the email folder that is to be monitored for new email message arrivals.

<config>
  <mailboxName>some mailbox name</mailboxName>
  <hostname>imap.gmail.com</hostname>
  <protocol>pop3 or imap or pop3s or imaps</protocol>
  <pollInterval>60</pollInterval>
  <port>optional port number</port>
  <user>some user name</user>
  <password>some password</password>
  <folder>optional IMAP folder name</folder>
  <leaveInFolder />
</config>

  • If leaveInFolder is specified the message will be marked as read but will remain in the folder. If this is not specified then the message will be deleted from the folder.
  • pollInterval specifies the period, in seconds, at which the mail folder will be polled for new messages.
  • folder specifies the name of the IMAP folder to poll for messages - it is not valid for pop3 folders.

Received Emails

When a new email message is found in the polled mail folder it is fetched and a root request is issued into the transport's host address space with the following request identifier...

mailfolder:message + mailbox @ [ value of mailboxName parameter ]

The transport creates a dynamically inserted address space emailMessage:/ into the superstack prior to issuing the request. Therefore the handler of the mailfolder:message request may SOURCE various elements of the message directly from this transient message space.