B4J Question pop3 message key

Discussion in 'B4J Questions' started by Dan Cox, Aug 23, 2019.

  1. Dan Cox

    Dan Cox Member Licensed User

    Is there a way to retrieve the actual key that the pop3 server uses internally to tag messages. I tried Messages.GetValueAt(i) but this appears to just be the message size unless I'm misinterpreting what I'm seeing.

    I need to track what messages have been downloaded and what is new on the server. The messages need to stay on the server but new ones need to be acted upon. There will be thousands and thousands of messages in a short period of time so downloading the entire message archive everytime is not feasible. Downloading the first few lines won't work either since nothing seems to be unique about the messages in the headers. I know there is an underlying scheme that commercial email clients use to track this.
    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Code:
    Sub POP_ListCompleted (Success As Boolean, Messages As Map)
        
    Log("List: " & Success)
        
    If Success Then
            
    For Each id In Message.Keys
              
    Log(id)
            
    Next
        
    End If
     
    End Sub
     
  3. Dan Cox

    Dan Cox Member Licensed User

    Actually I wanted the uid for the email. I guess I'll have to extract it from the Message-ID entry in the headers.
     
  4. Dan Cox

    Dan Cox Member Licensed User

    The solution is to save the message count and save that number in the registry and then download from that number onwards.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice