Private Sub InitializeConnection(ByVal hostname As String, ByVal port As String) Try _imapClient = New TcpClient(hostname, port) _imapNs = _imapClient.GetStream() _imapSw = New StreamWriter(_imapNs) _imapSr = New StreamReader(_imapNs) Catch ex As Exception MsgBox(ex.Message) End Try End Sub Private Function Response() As String Try Dim data(_imapClient.ReceiveBufferSize) As Byte Dim ret As Integer = _imapNs.Read(data, 0, data.Length) Return System.Text.Encoding.ASCII.GetString(data) Catch ex As Exception MsgBox(ex.Message) End Try End Function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)