wodSmtpServer ActiveX Control - RelayStateChange Method
      
 

Description

Called when relaying changes its state.


Return Type

None  


Syntax

object.RelayStateChange Owner, Relay, NewState, OldState



The RelayStateChange Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodSmtpNotify.
Owner Required. A wodSmtpServer object. Reference to wodSmtpServerCom instance that called this callback method.
Relay Required. A SmtpRelay object. Reference to the relay that changed its state.
NewState Required. A SmtpRelayStates enumeration, as described in settings. New state for the relay.
OldState Required. 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

NOTE: This method is called only if you implemented IwodSmtpNotify interface in your application, and wodSmtpServer1.Notification property has received reference to instance of your implementation.

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