wodSmtp ActiveX Control - StateChange Event
    
 

Description

Fires when wodSmtp's state changes.


Syntax

Private Sub object_StateChange(OldState)



The StateChange Event syntax has these parts:

Part Description
object A wodSmtp object.
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.

Remarks

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.