I need to read mails from Mail Server via IMAP and store in DB. My question is
- How i can know which mails are already stored in DB and which are now. Based on timestamp? But in that case I have to loop through all the mails and get the timestamp. I dont want to loop through or get all the mails because the mailbox will be huge.
What approach should i take? Should i forward new mails to a temp account - read from that account and then delete that mail?
Please let me know ASAP
Thanks