Sasl MechanismTry Create(String, Network Credential, Sasl Mechanism) Method
Try to create an instance of the specified SASL mechanism using the supplied credentials.
Definition
Namespace: MailKit.Security
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
if the SASL mechanism is supported; otherwise, .
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public static bool TryCreate(
string mechanism,
NetworkCredential credentials,
out SaslMechanism?? sasl
)Parameters
- mechanism String
- The name of the SASL mechanism.
- credentials NetworkCredential
- The user's credentials.
- sasl SaslMechanism
- The SASL mechanism if supported; otherwise, .
Return Value
Booleanif the SASL mechanism is supported; otherwise, .
Remarks
Tries to create an instance of the specified SASL mechanism using the supplied credentials.
Exceptions
| ArgumentNullException |
mechanism is . -or- credentials is . |