add source
This commit is contained in:
parent
0b3c452be9
commit
6a72593dd0
5
main.py
5
main.py
@ -150,8 +150,8 @@ def main():
|
||||
logger.info(f"Starting fetch for mailbox: {support_address}")
|
||||
# Prepare upsert, now including file_path
|
||||
insert_email = ("INSERT INTO emails "
|
||||
"(mail_id, thread_id, subj, date_sent, user_id, sent, file_path) "
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?) "
|
||||
"(mail_id, thread_id, subj, source, date_sent, user_id, sent, file_path) "
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?) "
|
||||
"ON DUPLICATE KEY UPDATE subj=VALUES(subj), updated_at=NOW(), file_path=VALUES(file_path)")
|
||||
|
||||
service = get_gmail_service(token_path)
|
||||
@ -192,6 +192,7 @@ def main():
|
||||
msg['id'],
|
||||
msg.get('threadId'),
|
||||
headers.get('Subject'),
|
||||
support_address,
|
||||
dt,
|
||||
user_id,
|
||||
sent_flag,
|
||||
|
Loading…
Reference in New Issue
Block a user