Click or drag to resize
MimeKit

SaslMechanismCreate(String, NetworkCredential) Method

Create an instance of the specified SASL mechanism using the supplied credentials.

Namespace: MailKit.Security
Assembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax
C#
public static SaslMechanism Create(
	string mechanism,
	NetworkCredential credentials
)

Parameters

mechanism  String
The name of the SASL mechanism.
credentials  NetworkCredential
The user's credentials.

Return Value

SaslMechanism
An instance of the requested SASL mechanism if supported; otherwise null.
Exceptions
ExceptionCondition
ArgumentNullException

mechanism is null.

-or-

credentials is null.

Remarks
If unsure that a particular SASL mechanism is supported, you should first call IsSupported(String).
See Also