0 votes

Hello,
Today I use mail.dll to write emails from my mailbox in a database.
It works great but the problem is that when I run my script for the 2nd time it creates me duplicates because it rewrites me all the mails that located in my pop server.
How to do ?
Put a break?
Play with the date of the last mail written?
Thanks in advance
Regards
Jules LACOSTE

by (200 points)
edited by
Use English please.

1 Answer

0 votes

Please consider using IMAP instead of POP3 - it has more features, and most likely your server supports it.

Here's an article that may help you:
https://www.limilabs.com/blog/get-new-emails-using-imap

It shows how to remember last processed email and download only newer emails.

by (297k points)
Merci pour l'aide :)
...