I am developing a web application in php. My task is to download all the mails from a mail server and save it into the database and the attachments will be saved in a folder. The user then opens up the mails with their attachments inside the application. The mails come on a daily basis. Only the new mails should be saved into the database. What I mean is that duplicate data should not be saved in the database.
Please help me how to go forward with this.
Any help is much appreciated.