I am going to write a Python code to upload new e-mails from a specific user account into MySQL database. This Python code is scheduled to run every miniute.
This user account is generic so nobody will come to check e-mails except the running code. Whenever the code runs, it should only upload NEW e-mails into database. In other words, the code can not upload a e-mail content if this e-mail is in the database already. Therefore I need to know how to distinguish if a e-mail has been "read" by the code or not.
Comparing "From", "To" and "Body" of a e-mail with corresponding parts in the database is certainly a way to find if that e-mail has been loaded or not, however this method is too clumsy to use. Is there any smart way to find this?
Thanks so much.