Commit a4c020e0 authored by 吕先亚's avatar 吕先亚

email add log

parent 3cc9723a
import logging
import os import os
from datetime import datetime, timedelta from datetime import datetime, timedelta
from pathlib import Path from pathlib import Path
...@@ -179,8 +180,13 @@ def sync_sp500(day): ...@@ -179,8 +180,13 @@ def sync_sp500(day):
def send_sp500(content, attach_paths): def send_sp500(content, attach_paths):
receives = ['Tony.Wu.Home@gmail.com'] receives = ['Tony.Wu.Home@gmail.com']
copies = ['wenwen.tang@thizgroup.com']
subject = 'sp500 eps download' subject = 'sp500 eps download'
sendmail(receives=receives, copies=[], attach_paths=attach_paths, subject=subject, content=content) try:
logging.info('start to sending email ...')
sendmail(receives=receives, copies=copies, attach_paths=attach_paths, subject=subject, content=content)
except Exception as e:
logging.error(e)
if __name__ == '__main__': if __name__ == '__main__':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment