C# Class Joshi.Utils.Imap.ImapBase

显示文件 Open project: rohitjoshi/ImapLibrary

Protected Properties

Property Type Description
IMAP_COMMAND_VAL ushort
m_bIsConnected bool
m_bSSLEnabled bool
m_nPort ushort
m_sHost string
m_sPassword string
m_sUserId string

Public Methods

Method Description
Capability ( ) : void

IMAP Capability command

ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool

Validate Certificate

Protected Methods

Method Description
Connect ( string sHost, ushort nPort, bool sslEnabled = false ) : ImapResponseEnum

Connect to specified host and port

Disconnect ( ) : void

Disconnect connection with Imap server

Log ( LogTypeEnum type, string log ) : void

Logging function

Receive ( ArrayList &sResultArray ) : ImapResponseEnum

retrieve response

ReceiveBuffer ( string &sBuffer, int nSize ) : int

Read the Server Response by specified size

SendAndReceive ( string command, ArrayList &sResultArray ) : ImapResponseEnum

Send command to server and retrieve response

SendAndReceiveByNumLines ( string command, ArrayList &sResultArray, int nNumLines ) : ImapResponseEnum

Send command to server and retrieve response

Method Details

Capability() public method

IMAP Capability command
public Capability ( ) : void
return void

Connect() protected method

Connect to specified host and port
protected Connect ( string sHost, ushort nPort, bool sslEnabled = false ) : ImapResponseEnum
sHost string Imap host
nPort ushort Imap port
sslEnabled bool
return ImapResponseEnum

Disconnect() protected method

Disconnect connection with Imap server
protected Disconnect ( ) : void
return void

Log() protected method

Logging function
protected Log ( LogTypeEnum type, string log ) : void
type LogTypeEnum Log type;LogTypeEnum
log string Log data
return void

Receive() protected method

retrieve response
protected Receive ( ArrayList &sResultArray ) : ImapResponseEnum
sResultArray ArrayList Imap Server response
return ImapResponseEnum

ReceiveBuffer() protected method

Read the Server Response by specified size
protected ReceiveBuffer ( string &sBuffer, int nSize ) : int
sBuffer string
nSize int
return int

SendAndReceive() protected method

Send command to server and retrieve response
protected SendAndReceive ( string command, ArrayList &sResultArray ) : ImapResponseEnum
command string Command to send Imap Server
sResultArray ArrayList Imap Server response
return ImapResponseEnum

SendAndReceiveByNumLines() protected method

Send command to server and retrieve response
protected SendAndReceiveByNumLines ( string command, ArrayList &sResultArray, int nNumLines ) : ImapResponseEnum
command string Command to send Imap Server
sResultArray ArrayList Imap Server response
nNumLines int
return ImapResponseEnum

ValidateServerCertificate() public method

Validate Certificate
public ValidateServerCertificate ( object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors ) : bool
sender object
certificate X509Certificate
chain X509Chain
sslPolicyErrors SslPolicyErrors
return bool

Property Details

IMAP_COMMAND_VAL protected_oe static_oe property

Imap Command Identifier value:Initial 0
protected static ushort IMAP_COMMAND_VAL
return ushort

m_bIsConnected protected_oe property

Is Imap server connected
protected bool m_bIsConnected
return bool

m_bSSLEnabled protected_oe property

SSL Enabled
protected bool m_bSSLEnabled
return bool

m_nPort protected_oe property

Imap port : default IMAP_DEFAULT_PORT : 143
protected ushort m_nPort
return ushort

m_sHost protected_oe property

Imap host
protected string m_sHost
return string

m_sPassword protected_oe property

User Password
protected string m_sPassword
return string

m_sUserId protected_oe property

User id
protected string m_sUserId
return string