Android Question java.lang.RuntimeException: POP3 should first be initialized.

MaxWaterfall

Member
Licensed User
Longtime User
Getting this error even after POP3 has downloaded many mails (been initialized). Any solutions?

Error: java.lang.RuntimeException: POP3 should first be initialized.

P.S. Sorry for posting so much, kinda new
 

DonManfred

Expert
Licensed User
Longtime User
did you use Close or CloseNow in your code? If yes then you should initialize the object again after you closed it.
 
Upvote 0

MaxWaterfall

Member
Licensed User
Longtime User
This fixed my problem, thankyou, just wandering if you have any idea why the last message in my inbox never gets downloaded? 5/6 always get downloaded but the last one never does. I've got it set to download all messages!
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
maybe you ar misinterpreting the 5 (or the 6) wrong.

remember:
B4X:
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), True) '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
If you mailbox contins 6 messages you will download 0 to 5
 
Upvote 0
Top