michaelwandel
9 years ago
Hi,

i always get an error "There's no message 0" when deleting over pop3 with ssl on and the following code:


Dim oServer As New EAGetMailObjLib.MailServer
Dim oClient As New EAGetMailObjLib.MailClient
oClient.LicenseCode = exLicense

oServer.Server = exServer
oServer.User = exUsername
oServer.Password = exPassword
oServer.Protocol = 0
oServer.SSLConnection = True
oServer.AuthType = 0
oServer.Port = 995

oClient.Connect oServer

Dim oInfo As New EAGetMailObjLib.MailInfo
oInfo.UIDL = delMailUIDL

oClient.Delete oInfo

oClient.Quit
oClient.Close



uidls are looking like this: 1461237332.2

Any idea ?
ivan
  • ivan
  • 100% (Exalted)
  • Administration
9 years ago
Hi, you cannot use UIDL to delete the email directly like that.
Because UIDL is not persistent in POP3 protocol.

In POP3 protocol, you can only delete the email by index.

please see the following example:


    Dim infos
    infos = oClient.GetMailInfos()
    
    Dim i As Integer
    For i = LBound(infos) To UBound(infos)
        Dim info As EAGetMailObjLib.MailInfo
        Set info = infos(i)
        
        if info.UIDL = "your uidl" Then
        
          ' Mark email as deleted from POP3 server.
          oClient.Delete info
          Exit For
        End If
    Next

    oClient.Quit
michaelwandel
9 years ago
Great ! Thanks for the immediate help, that's it :)

Regards, Michael

EXPLORE TUTORIALS

© All Rights Reserved, AIFEI Software Limited & AdminSystem Software Limited.