I'm trying to download all messages (even previously downloaded ones), from gmail. However after the first time I download the email, it becomes invisible to my download client. Also I've noticed that if I set the OptionsDelete=1 property, it is basically ignored (or is something more required to delete the message?). I'm not sure if it is a gmail issue or something else is going on. Here is my code for downloading email:
ThisEmailReceive.Server = POPServer
ThisEmailReceive.Port = POPPort
ThisEmailReceive.User = Username
ThisEmailReceive.Password = Password
ThisEmailReceive.OptionsDelete = 1
ThisEmailReceive.OptionsDontSaveAttachments = 0
ThisEmailReceive.OptionsDontSaveEmbeds = 1
ThisEmailReceive.attachmentPath = CLIP(IncomingDirectory) & '\'
ThisEmailReceive.SSL = POPRequiresSSL
ThisEmailReceive.SSLCertificateOptions.CertificateFile = ''
ThisEmailReceive.SSLCertificateOptions.PrivateKeyFile = ''
ThisEmailReceive.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 1
ThisEmailReceive.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 1
ThisEmailReceive.SSLCertificateOptions.CARootFile = '.\CaRoot.pem'