In order to know if you've sent email in the previous 24 hours, you'll need to make a record of sending the email. You might store that information in a text file, an IMAP folder, a database, through a web app, or many other ways. How you store that data is your design decision.
Here is one possibility, in which the timestamp is stored in the modification date of a local file.
#UNTESTED EXAMPLE CODE
def create_timestamp():
with open("tsfile", "w") as fp:
fp.write("now")
def time_since_last_timestamp():
return time.time() - os.path.getmtime("tsfile")
...
if 'Non-existent' not in str(p) and time_since_last_timestamp() > 86400:
server.sendmail(...)
create_timestamp()