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.10.0
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 .
Exceptions
ExceptionCondition
ArgumentNullException

mechanism is .

-or-

credentials is .

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