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 .

emailMessage:/ Address Space

The emailMessage:/ address space contains information about a single email message. One such space is dynamically inserted into the call stack by the SMTPTransport and the MailFolderTransport for each root request they issue.

This diagram shows the relationships between the root request, the inserted transient emailMessage:/ address space and the endpoint (Mail Handler Endpoint) that resolves and evaluates each root request.

image/svg+xml Application Space Fulcrum Space SMTPTransport MailFolderTransport Inserted Message Space emailMessage:/.* Mail Handler Endpoint Grammar smtp:message.* mailfolder:message.*

Message Headers

emailMessage:/partCount

Provides the number of parts contained in the email message as an Integer.

emailMessage:/subject

Provides the subject of the message as a String.

emailMessage:/from

Provides the email address of the sender message as a String.

emailMessage:/to

Provides the recipients addresses of the message as an IHDSNode with the following form...

<to>
  <address>someone@domain.com</address>
  <address>someone.else@domain.com</address> ...
</to>

emailMessage:/headers

Provides a complete list of all the message's headers in an IHDSNode tree with the following form...

<headers>
  <header>
    <name>To</name>
    <value>someone@some.domain.com</value>
  </header> ... all headers ...
</headers>

Values are unfolded Strings (see RFC 822).

emailMessage:/header/XXXXX

Provides a list of all values of the XXXXX named header in an IHDSNode tree with the following form...

<header>
  <name>To</name>
  <value>someone@some.domain.com</value>
  <value>someone.else@some.domain.com</value>
  <value>another.person.@some.domain.com</value>
</header>

Values are unfolded Strings (see RFC 822).

Message Parts

Messages may consist of any number of parts. They are addressable by message position starting from 0 (zero) as the first part. In the interface description below this is symbolized by X as the integer part number...

emailMessage:/part/X/body

Provides the X'th body part as a IReadableBinaryStreamRepresentation.

emailMessage:/part/X/mimetype

Provides the mimetype of the X'th body part as a String

emailMessage:/part/X/filename

Provides the filename of the X'th body part as a String or null if it does not exist.

Raw Javax Mail Message

WARNING the Java mail API does not provide an immutable interface. It is strongly recommended that you treat this object as readonly and do not modify the object.

The address space is backed by the received javax.mail.Message. You may gain direct access to this object by requesting the resource emailMessage:/raw.