MailBee.NET Objects 3.1

Smtp.GetSocketError Method 

Returns a Win32 error code of the last socket-related error.

public int GetSocketError();

Return Value

An integer value containing the last socket-related error code, or 0 if there is no error.

Remarks

This error code is obtained from NativeErrorCode.

Exceptions

Exception Type Condition
MailBeeInvalidStateException There are multiple or non-SMTP connections being opened at the moment (IsSmtpContext is false).

See Also

Smtp Class | MailBee.SmtpMail Namespace