Click here to Skip to main content
15,914,419 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Class process fails running from network drive ?? Pin
Dave Kreskowiak24-Oct-07 13:42
mveDave Kreskowiak24-Oct-07 13:42 
QuestionFlex Grid Pin
Sinchan Nikam23-Oct-07 0:55
Sinchan Nikam23-Oct-07 0:55 
AnswerRe: Flex Grid Pin
Dave Kreskowiak23-Oct-07 3:54
mveDave Kreskowiak23-Oct-07 3:54 
Questioncrystal report problem Pin
magedhv23-Oct-07 0:43
magedhv23-Oct-07 0:43 
AnswerRe: crystal report problem Pin
AliAmjad23-Oct-07 1:25
AliAmjad23-Oct-07 1:25 
GeneralRe: crystal report problem Pin
magedhv23-Oct-07 2:04
magedhv23-Oct-07 2:04 
GeneralRe: crystal report problem Pin
AliAmjad23-Oct-07 4:28
AliAmjad23-Oct-07 4:28 
QuestionHow to retrieve mail from gmail's POP Server in VB.Net 2005? Pin
hgs24shravgi23-Oct-07 0:06
hgs24shravgi23-Oct-07 0:06 
I am creating an application in VB.Net 2005 to retrieve emails from Gmail's POP3 Server for this I used following code -

Dim TCP As Net.Sockets.TcpClient
Dim stream As Net.Sockets.NetworkStream
Dim StreamReaderCallback As AsyncCallback
Dim ReadBuffer(256) As Byte
Dim streamSSl As System.Net.Security.SslStream
Sub POPConnect(ByVal strUserName As String, ByVal strPassword As String)
'connect to the pop3 server over port 995
Try
TCP = New Net.Sockets.TcpClient
TCP.Connect("pop.gmail.com", 995)
stream = TCP.GetStream()
streamSSl = New System.Net.Security.SslStream(stream)
streamSSl.AuthenticateAsClient("pop.gmail.com", )
StreamReaderCallback = New AsyncCallback(AddressOf ReadStream)
stream.BeginRead(ReadBuffer, 0, ReadBuffer.Length, StreamReaderCallback, Nothing)
Catch ex As Exception
MsgBox(ex.Message)
Exit Sub
End Try
End Sub

Private Sub ReadStream(ByVal ir As IAsyncResult)
Dim getByte As Integer = stream.EndRead(ir)
If (getByte > 0) Then
Dim sGetMsg As String = System.Text.Encoding.ASCII.GetString(ReadBuffer)
validateMsg(sGetMsg)
End If
End Sub

Private Sub validateMsg(ByVal s As String)
Select Case s
Case "+OK"
MessageBox.Show("Got response from gmial")
End Select
End Sub

But I am not able to read that response i.e. System.Text.Encoding.ASCII.GetString(ReadBuffer) I am getting some encoded value (just three boxes)
I also tried
Dim sGetMsg As String = System.Text.Encoding.ASCII.GetString(ReadBuffer, 0, getByte)
But still I am not getting how to decode that response.
Please tell me how to read that stream.

AnswerRe: How to retrieve mail from gmail's POP Server in VB.Net 2005? Pin
Dave Kreskowiak23-Oct-07 3:51
mveDave Kreskowiak23-Oct-07 3:51 
Questionhow to convert Rupees into word? Pin
sathyan_829423-Oct-07 0:01
sathyan_829423-Oct-07 0:01 
AnswerRe: how to convert Rupees into word? Pin
Christian Graus23-Oct-07 0:12
protectorChristian Graus23-Oct-07 0:12 
AnswerRe: how to convert Rupees into word? Pin
Colin Angus Mackay23-Oct-07 0:22
Colin Angus Mackay23-Oct-07 0:22 
QuestionHow to run EXE thru network Pin
kkb_200122-Oct-07 23:17
kkb_200122-Oct-07 23:17 
AnswerRe: How to run EXE thru network Pin
Dave Kreskowiak23-Oct-07 2:23
mveDave Kreskowiak23-Oct-07 2:23 
AnswerRe: How to run EXE thru network Pin
Dave Kreskowiak23-Oct-07 2:28
mveDave Kreskowiak23-Oct-07 2:28 
Questionimage manipulation Pin
anorangecat22-Oct-07 22:48
anorangecat22-Oct-07 22:48 
AnswerRe: image manipulation Pin
Ajay.k_Singh23-Oct-07 0:00
Ajay.k_Singh23-Oct-07 0:00 
QuestionRe: image manipulation Pin
anorangecat26-Oct-07 18:26
anorangecat26-Oct-07 18:26 
AnswerRe: image manipulation Pin
Ajay.k_Singh28-Oct-07 1:38
Ajay.k_Singh28-Oct-07 1:38 
AnswerRe: image manipulation Pin
Christian Graus23-Oct-07 0:12
protectorChristian Graus23-Oct-07 0:12 
QuestionDoes vista home premium has IIS to support web development Pin
Mekong River22-Oct-07 22:30
Mekong River22-Oct-07 22:30 
AnswerRe: Does vista home premium has IIS to support web development Pin
Guffa22-Oct-07 23:04
Guffa22-Oct-07 23:04 
GeneralRe: Does vista home premium has IIS to support web development Pin
Mekong River22-Oct-07 23:18
Mekong River22-Oct-07 23:18 
AnswerRe: Does vista home premium has IIS to support web development Pin
pmarfleet22-Oct-07 23:07
pmarfleet22-Oct-07 23:07 
GeneralRe: Does vista home premium has IIS to support web development Pin
Mekong River22-Oct-07 23:22
Mekong River22-Oct-07 23:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.