public static string GetPortName(hMailServer.TCPIPPort port)
{
string ipAddress = port.Address;
string portNumber = port.PortNumber.ToString();
string protocolName = "";
switch (port.Protocol)
{
case eSessionType.eSTIMAP:
protocolName = "IMAP";
break;
case eSessionType.eSTPOP3:
protocolName = "POP3";
break;
case eSessionType.eSTSMTP:
protocolName = "SMTP";
break;
}
return ipAddress + " / " + portNumber + " / " + protocolName;
}