Hunny Software Library Reference

SmtpClient.HasCapability Method 

Indicates if the server has specified a capability.

[Visual Basic]
Public Function HasCapability( _
   ByVal name As String _
) As Boolean
[C#]
public bool HasCapability(
   string name
);

Parameters

name
The name of the capability to match.

Return Value

True if the named capability is found in the list

Remarks

If the EHLO command succeeds, the SMTP server returns a list of optional capabilities that it supports.

The SmtpClient class saves this list of capabilities and provides methods that allow you to examine it. The HasCapability method provides a simple way for you to check if the server supports a particular capability. Internally, the HasCapability method iterates over the list of capabilities attempting to match the desired capability name. The method returns a true value if it finds a match.

See Also

SmtpClient Class | Hunny.Mail Namespace