wodSmtpServer ActiveX Control - RelayStateChange Event
    
 

Description

Fires when relaying changes its state.


Syntax

Private Sub object_RelayStateChange(Relay, NewState, OldState)



The RelayStateChange Event syntax has these parts:

Part Description
object A wodSmtpServer object.
Relay A SmtpRelay object. Reference to the relay that changed its state.
NewState A SmtpRelayStates enumeration, as described in settings. New state for the relay.
OldState A SmtpRelayStates enumeration, as described in settings. Previous state for the relay.

Settings

The settings for NewState are:

Constant Value Description
 RelayIdleWaiting 0 Not yet connected - waiting.
 RelayResolvingMX 1 Trying to obtain Mail Exchanger address.
 RelayResolvingA 2 Trying to obtain IP address of the server.
 RelayConnecting 3 Connecting to the server.
 RelayConnected 4 Connected to the server.
 RelayHello 5 Sending HELO command.
 RelayMailFrom 6 Sending MAIL FROM command.
 RelayRcptTo 7 Sending RCPT TO command.
 RelayData 8 Sending message.
 RelaySendingHeaders 9 Sending message headers.
 RelaySendingBody 10 Sending message body
 RelayDone 11 Done relaying.
 RelayAuthenticating 12 Authenticating with the server.
 RelayNegotiatingSSL 13 Negotiating SSL encryption.
 RelayEstablishedSSL 14 Established SSL encryption.

The settings for OldState are:

Constant Value Description
 RelayIdleWaiting 0 Not yet connected - waiting.
 RelayResolvingMX 1 Trying to obtain Mail Exchanger address.
 RelayResolvingA 2 Trying to obtain IP address of the server.
 RelayConnecting 3 Connecting to the server.
 RelayConnected 4 Connected to the server.
 RelayHello 5 Sending HELO command.
 RelayMailFrom 6 Sending MAIL FROM command.
 RelayRcptTo 7 Sending RCPT TO command.
 RelayData 8 Sending message.
 RelaySendingHeaders 9 Sending message headers.
 RelaySendingBody 10 Sending message body
 RelayDone 11 Done relaying.
 RelayAuthenticating 12 Authenticating with the server.
 RelayNegotiatingSSL 13 Negotiating SSL encryption.
 RelayEstablishedSSL 14 Established SSL encryption.

Remarks

RelayStateChange event is fired when state changes to specific relay. State for other relays, for wodSmtpServer, or any user connected to the server, are not affected by this state change - only this specific relay is affected.