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: