NetTalk E-Mail > E-Mail - Ask For Help
POP3: Deleting yesterday's messages only (SOLVED)
(1/1)
DonnEdwards:
Hi all
I am busy with an app that sends a test email every 5 minutes from 5am to 9pm from the SMTP server mail.mensclinic.co.za to POP3 server mail.petfindsa.co.za. Normally, the mail arrives in seconds, but once the SMTP server gets busy, there can be a delay, anything up to 2 hours. Some of these messages need to arrive within a few minutes because they are being sent to an email-to-sms gateway and the patient has to wait for the SMS to get a one-time pin.
When I send the message, I also write it to a table. A few minutes later, I connect to the POP3 server and start looping through the messages, as demonstrated in the "NetTalk->email->Demo" app and the "NetTalk->email->Email Receive With Dont Download Again" examples.
In the ThisEmailReceive.Done procedure I tried the following:
dtmSentDate DATE
--- Code: ---if dtmSentDate < today() then
self.OptionsDelete = true
self.DecideToDelete
end
--- End code ---
This successfully deleted all the emails, not just the old ones. So I'm obviously not understanding something correctly. Any suggestions, code or advice would be greatly appreciated.
DonnEdwards:
It's amazing what happens when you re-read the manual, in this case
nettalk3.htm#The_NetEmailReceive_Methods
It's working now
Navigation
[0] Message Index
Go to full version