send_email.py 509 B

123456789101112131415161718
  1. # coding:utf-8
  2. import time
  3. import requests
  4. from loguru import logger
  5. def sendMail(content: str):
  6. # content = content + '<br>' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
  7. # api_url = 'http://172.17.145.179:19281/_send/_mail'
  8. # api_parm = {
  9. # 'to': "yaojingge@topnet.net.cn",
  10. # 'title': '客户数据同步异常',
  11. # 'body': content,
  12. # }
  13. # response = requests.get(api_url, api_parm)
  14. # logger.info('邮件发送 ' + response.text)
  15. print(content)