Commit 18aa8fab authored by 王志伟's avatar 王志伟

数据指标波动假设检验统计

parent a2cdc4b2
......@@ -386,21 +386,17 @@ my_pass = 'VCrKTui99a7ALhiK'
my_user1='gaoyazhe@igengmei.com'
my_user2='wangzhiwei@igengmei.com'
def mail():
ret=True
ret = True
try:
smtp = smtplib.SMTP()
smtp.connect('smtp.exmail.qq.com,465')
smtp.login(my_sender, my_pass)
text = "Hi!\nHow are you?\nHere is the link you wanted:\nhttp://www.baidu.com"
msg=MIMEText(text,'plain','utf-8')
# msg['From']=formataddr(["高雅喆",my_sender])
# msg['To']=my_user1 + ',' + my_user2
# msg['Subject']= str(datetime.date.today())+"-监控指标假设检验"
# server=smtplib.SMTP_SSL("smtp.exmail.qq.com", 465)
# server.login(my_sender, my_pass)
smtp.sendmail(my_sender,[my_user1,my_user2],msg.as_string())
smtp.quit()
msg = MIMEText(text, 'plain', 'utf-8')
msg['From'] = formataddr(["高雅喆", my_sender])
msg['To'] = my_user1 + ',' + my_user2
msg['Subject'] = str(datetime.date.today()) + "-esmm多目标模型训练指标统计"
server = smtplib.SMTP_SSL("smtp.exmail.qq.com", 465)
server.login(my_sender, my_pass)
server.sendmail(my_sender, [my_user1, my_user2], msg.as_string())
server.quit()
except Exception:
ret=False
return ret
......
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