B4J Question question on Building a mini "Email based server"

juvanum

Active Member
Licensed User
Longtime User
Hello,
I'm trying the erel' solution " Building a mini Email based server".

1) If i use a gmail account (example@gmail.com) all run properly: the messages are downloaded only once and the messages are not deleted


2) If I use another account not google (example@fofo.it), the messages are downloaded every time

3) if I use microsoft outlook on the same account (example@fofo.it), the messages are downloaded only once and the messages are not deleted

Why (step 2) the same messages are downloaded always??

thank you
 

juvanum

Active Member
Licensed User
Longtime User
UPDATE: parameters

email: example@fofo.it
password: xxx
use ssl: false
pop port: 110
smtp port: 25
pop server: mail.fofo.it
smtp server: smtp.fofo.it
delete msg: false
 
Upvote 0

juvanum

Active Member
Licensed User
Longtime User
I don't remember the exact code however you should download the messages and set the last parameter in POP.DownloadMessage (Delete) to True.
Thanks Erel but I need them not to be deleted.
However I would like only the new messages to be downloaded.
the gogle account does it, other providers do not.

B4X:
Sub pop_ListCompleted (Success As Boolean, Messages As Map)
    
    Log("list completed")   
    If Success Then
        If Messages.Size > 0 Then
            LogMessage("Found messages: " & Messages.Size)
             For Each id As Int In Messages.Keys
                pop.DownloadMessage(id, deleteMsg) 'if true message will be deleted from the server
                
            Next
            lastMsgId = id
        Else
            Log("No messages.")
        End If
    Else
       LogMessage("Error: " & LastException)
   
    End If   
    pop.Close 'this will close the connection after the messages were downloaded.
 
End Sub
 
Upvote 0

juvanum

Active Member
Licensed User
Longtime User
I have sent the email to another account (stored@fofo.it) and then eliminate it
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…