Gets strongest authentication method which we can support from SMTP server.
Preference order DIGEST-MD5 -> CRAM-MD5 -> LOGIN -> PLAIN.
Declaration Syntax
C# | Visual Basic | Visual C++ | F# |
public AUTH_SASL_Client AuthGetStrongestMethod( string userName, string password )
Public Function AuthGetStrongestMethod ( userName As String, password As String ) As AUTH_SASL_Client
public: AUTH_SASL_Client^ AuthGetStrongestMethod( String^ userName, String^ password )
member AuthGetStrongestMethod : userName : string * password : string -> AUTH_SASL_Client
Return Value
AUTH_SASL_Client
Returns authentication method.
Returns authentication method.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | Is raised when this object is disposed and this method is accessed. |
InvalidOperationException | Is raised when SMTP client is not connected . |
ArgumentNullException | Is raised when userName or password is null reference. |
ArgumentException | Is raised when any of the arguments has invalid value. |
NotSupportedException | Is raised when SMTP server won't support authentication or we
don't support any of the server authentication mechanisms. |
Assembly: LumiSoft.Net (Module: LumiSoft.Net.dll) Version: 4.5.5510.19119