From b1a22f817c2299bf9f31c5a9c5af5a9602665582 Mon Sep 17 00:00:00 2001 From: halliday Date: Tue, 19 Mar 2024 17:29:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=99=BB=E5=BD=95=E8=AE=A4?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 检查作业成功率/SendEmail.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/检查作业成功率/SendEmail.py b/检查作业成功率/SendEmail.py index 4153461..5340682 100644 --- a/检查作业成功率/SendEmail.py +++ b/检查作业成功率/SendEmail.py @@ -22,9 +22,9 @@ week = str(datetime.now().isocalendar()[1]) def send_mail(): # 发件人 - sender = 'mh@unamail.com' + sender = 'mh@una-mail.com' # 接收邮件,可以发给多人 - receivers = ['mh@unamail.com','zry@unamail.com','ypy@unamail.com','zxw@unamail.com'] + receivers = ['mh@una-mail.com','yk@una-mail.com','sr@una-mail.com','dn@una-mail.com'] # 邮件主体 msg = MIMEMultipart() # 正文取文本中的内容 @@ -46,9 +46,10 @@ def send_mail(): #att["Content-Disposition"] = 'attachment; filename="{}"'.format( # file_name_week) #msg.attach(att) - try: smtpObj = smtplib.SMTP('10.10.110.102') + #身份认证 + smtpObj.login(sender,"111111") smtpObj.sendmail(sender, receivers, msg.as_string()) print("邮件发送成功") except smtplib.SMTPException: