SMTP Listener

The SMTP listener is written as a SMTP event sink, as the SMTP Service processes the SMTP protocol, it can raise events to components that are configured to receive such events. The listener uses the OnArival event to examine the payload, pass the SOAP request off to the dispatcher, and generate a new email with the response.

Registering the listener with the SMTP Service

Each SMTP event sink needs to be registered with the SMTP service, in order to receive events, the following will register the SMTP SOAP listener with the SMTP service.
cscript smtpreg.vbs /add 1 OnArrival soapListener 4s4c.smtpSoap "rcpt"
the 1 (after /add) is the virtual SMTP service, if you have the default single SMTP server install, this will be fine, if you have installed multiple virtual services, you'll need to select the correct one here. The last item "rcpt" is a filter, the event will only be generated when the message passes this filter, in this case, the email must be addressed to You should replace this with the correct address for your installation.

To unregister the listener from the SMTP service, use (note that this is case sensitive)
cscript smtpreg.vbs /remove 1 OnArrival soapListener
you can use the following to display the registered sinks
cscript smtpreg.vbs /enum
The SMTP listener expects to find the config.xml file in the same directory as the smtpSoap.dll (typically 4s4c\smtp)

Testing the Listener

Once you've registered the event sink, you can test it by send an email to your soap listener address, with the following plain text email body
  <m:Add xmlns:m="">
and it should email you back the response.
<?xml version="1.0"?>
<SOAP-ENV:Envelope  xmlns:SOAP-ENV=""
  <m:AddResponse xmlns:m="">
   <added xsi:type="xsd:int">42</added>

<<< Using the HTTP Listener      >>> The Dispatcher Component