Back to product page

Blocking Property


Determines if methods are blocking.

Type

Boolean

Syntax

  • Basic
object.Blocking [= value]
The Blocking(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodSmtp
valueA Boolean value.

Remarks

Blocking property determines if wodSmtp will block the thread where it executes, or it will work in async mode - in the background.

When blocking is set, then when you issue, for example, SendMessage method, when it returns you will already have message delivered (if no error occurred). If any error occurs, it will be returned through SendMessage call - so you can catch it in your application. This is usable for scripting environments.

When blocking is not set, then when you issue, for example, SendMessage method, it will return the control to your program immediately, work in the background and download the message, and fire Done event when it finishes. If any error occurs, it will be provided in the Done event. From this event you can initiate new commands if needed.

When Blocking mode is used you should NOT initiate new commands from within wodSmtp's own events!

Platforms

Windows