# coding:utf-8 import time import requests from loguru import logger def sendMail(content: str): # content = content + '
' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) # api_url = 'http://172.17.145.179:19281/_send/_mail' # api_parm = { # 'to': "yaojingge@topnet.net.cn", # 'title': '客户数据同步异常', # 'body': content, # } # response = requests.get(api_url, api_parm) # logger.info('邮件发送 ' + response.text) print(content)