📜  ValueError:消息中最多有 1 个主题标头 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:05.204000             🧑  作者: Mango

代码示例1
for email in email_list:
    msg['To'] = email
    server = smtplib.SMTP(host='smtp.gmail.com', port=587)
    server.starttls()
    server.login("myemail@gmail.com", "mypassword")
    server.send_message(msg)
    server.quit()
    del msg['To]  <----- Delete the subject of the message to resend.