wodSmtp ActiveX Control - StateChange Method
      
 

Description

Called when wodSmtp's state changes.


Return Type

None  


Syntax

object.StateChange Owner, OldState



The StateChange Method syntax has these parts:

Part Description
object An expression evaluating to an object of type wodSmtpClientNotify.
Owner  A wodSmtpCom object. Reference to wodSmtpCom instance that called this callback method.
OldState  A SmtpStates enumeration, as described in settings. Represents previous state.

Settings

The settings for OldState are:

Constant Value Description
 Disconnected 0 Not connected.
 RelayResolvingMX 1 Trying to obtain Mail Exchanger address.
 RelayResolvingA 2 Trying to obtain IP address of the server.
 Connecting 3 Connecting to the server.
 SendingGreeting 4 Sending greeting to the server.
 LogonInProgress 5 Sending authentication information.
 Connected 6 Connected to the server.
 SendingMailFrom 7 Sending MAIL FROM command.
 SendingRcptTo 8 Sending RCPT TO command.
 SendingData 9 Sending DATA command.
 SendingHeaders 10 Sending message headers.
 SendingBody 11 Sending message body
 Resetting 12 Sending greeting to the server.
 Completed 13 Completed sending message.
 Retrying 14 Disconnected, will retry again.
 NegotiatingSSL 15 Negotiating SSL encryption.
 EstablishedSSL 16 Established SSL encryption.

Remarks

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

StateChange event is fired when wodSmtp changes its state, from Disconnected to Connecting, then to LogonInProgress etc.

To get current state you can use State property. To get text description of the state, you can use StateText property.

For list of all possible states, click here.