def send_mail(to_mail, subject,data, filename=None):
smtp_server = 'smtp.exmail.qq.com'
from_mail = ""
mail_pass = ""
msg = MIMEMultipart()
msg["From"] = from_mail
msg["To"] = ','.join(to_mail)
msg["Subject"] = Header(subject, 'utf-8').encode()
#构造html
d = datetime.now()
dt = d.strftime('%Y-%m-%d')
at = (d - timedelta(1)).strftime('%Y-%m-%d')
timezone = at
html = f"""\
标签覆盖率统计
统计时间: """ + timezone + """
标签名
Hive覆盖率
ES覆盖率
"""+data+"""