6
6
655362016-05-19 17:05:55
PHP
65536, 2016-05-19 17:05:55

How to download recent emails via IMAP?

Is it possible to download emails starting from a certain date? I don't see this anywhere in the imap_* functions, unless
you can get the message numbers within the mailboxes and compare them. But if the letter is moved to another folder, then it is highly likely that the client will get out of sync with the server.
As an option, I see only picking up one at a time and looking at whether it has already been replicated or not, if so, then stop. But this is also an option. I would like to cut off already downloaded ones when picking up.
How it's done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmitriy, 2016-05-19
@65536

php.net/manual/ru/function.imap-search.php
search criteria SINCE "date"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question