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:SMTPServerTransport
Description:The SMTPTransport creates an SMTP server that will receive email delivery request (it does not act as an SMTP relay) and will issue a root request when it detects the arrival of a new email message.
Id:SMTPTransport
Category:transport

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

Parameters

The SMTPTransport prototype has the following initialisation parameters:

NameRulesTypingDefaultDescription
configOptionalIdentifier or XMLnull
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 SMTPServerTransport:

<transport>
  <prototype>SMTPTransport</prototype>
</transport>
Import Requirements

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

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

The SMTPTransport creates an SMTP server that will receive email delivery request (it does not act as an SMTP relay) and will issue a root request when it detects the arrival of a new email message.

It is recommended that the port be a value greater than 1024 since on Unix hosts only the root account may open low-numbered ports. If this SMTP transport must be available on the standard SMTP port 25, we we recommend that you configure an operating system firewall rule to tunnel port 25 to the operational port number.

Never run a Java server as root.

Configuration

The 'optional config parameter provides the specification for the mail transport folder

<config>
  <hostname>smtp.mycompany.com</hostname>
  <port>port number</port>
</config>

If config is not present then the hostname will be set as the physical platform's hostname and port will default to 25000.

Received Emails

When a new email message is received a request is constructed and issued into the transports host address space.

smtp:message + from @ [ from address ] + to @ [ to address ]

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