Discuss this help topic in SecureBlackbox Forum
SMTP: Request server capabilities
After successful connection, it is possible to get an idea which SMTP services does the server support. The list of supported services is reported in reply to EHLO command. This command is issued automatically for the first time just after the connection is established, and for the second time after the connection is secured. So, if the explicit manual mode is used, it is a good idea to check for supported services not only after call of Open() method but also after call of EstablishSSL() method, because these lists may differ for secure and insecure sessions.
To get an idea which SMTP services are supported by the server, check ExtensionXXXSupported properties.
Examples:
C#:
if (smtp.ExtensionDSNSupported)
{
// the server supports delivery notifications
smtp.DSNReturnType = SBSMTPClient.Unit.srtHeaders;
smtp.DSNOptions = SBSMTPClient.Unit.sdnFailure;
}
if (smtp.ExtensionSizeSupported)
Console.WriteLine("Maximum message size allowed: {0}", smtp.MaxMessageSize);
Delphi:
if smtp.ExtensionDSNSupported then
begin
// the server supports delivery notifications
smtp.DSNReturnType := srtHeaders;
smtp.DSNOptions := [sdnFailure];
end;
if smtp.ExtensionSizeSupported then
writeln('Maximum message size allowed: ' + IntToSStr(smtp.MaxMessageSize));