property SASLMechanisms: TScSASLCollection;

 

Description

Holds a collection of TScSASLItem objects that implement SASL mechanisms and store information for authentication.

SASL authentication is only employed when the UseSASLMechanisms property is set to True.

At design time, you can invoke the SASLMechanisms list editor by double-clicking the TScSMTPClient component. At runtime, you can use the following code to add mechanisms to the list:

 

SMTPClient.SASLMechanisms.Clear;

TScSASLItem(SMTPClient.SASLMechanisms.Add).SASLMechanism := TScSASLOAUTH2.Create;

TScSASLItem(SMTPClient.SASLMechanisms.Add).SASLMechanism := TScSASLLogin.Create;

 

You can explore more options for managing the SASLMechanisms list at runtime in Demos\SMTPClient\. 

 

The Authenticate method iterates over Items and checks if a given mechanism is ready to start the authentication process. If a mechanism is ready, a login attempt is made using this mechanism.

 

See Also

Authenticate

UseSASLMechanisms

 

SecureBridge Components, Copyright © 2007-2025 Devart. All Rights Reserved. Provide Feedback Visit Forum Request Support