Greetings,
I am trying to use the B4J jNet example for POP and it doesn't seem to do anything. No errors or faults.
Am I missing something ?
I am trying to use the B4J jNet example for POP and it doesn't seem to do anything. No errors or faults.
Am I missing something ?
jNet POP example:
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Dim POP As POP3
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
POP.Initialize("mail.twc.com", 110, "l*******@***.com", "********", "pop")
POP.UseSSL = True 'Gmail requires SSL.
End If
POP.ListMessages
End Sub
Sub POP_ListCompleted (Success As Boolean, Messages As Map)
Log("List: " & Success)
If Success Then
For i = 0 To Messages.Size - 1
POP.DownloadMessage(Messages.GetKeyAt(i), False) 'Download all messages and delete them
Next
Else
Log(LastException.Message)
End If
POP.Close 'The connection will be closed after all messages are downloaded
End Sub
Sub POP_DownloadCompleted (Success As Boolean, MessageId As Int, Message As String)
Log("Download: " & Success & ", " & MessageId)
If Success Then
Log(Message)
Log(Message.Length)
Log(MessageId)
Else
Log(LastException.Message)
End If
End Sub