• Python简单实现邮件群发


    Python简单实现邮件群发

            import smtplib
            from email.mime.text import MIMEText
            from email.utils import formataddr
              
            msg = MIMEText('xaaxaxaxafdjikgjhdjfg', 'plain', 'utf-8')
            msg['From'] = formataddr(["张三",'zhangsan@126.com'])
            msg['To'] = formataddr(["李四",'lisi@163.com'])
            msg['Subject'] = "邮件主题"
              
            server = smtplib.SMTP("smtp.126.com", 25) #端口
            server.login("zhangsan@126.com", "asdfadfsdfa")
            server.sendmail('zhangsan@126.com', ['lisi@163.com',‘wangwu@163.com’], msg.as_string())
            server.quit()
  • 相关阅读:
    wm
    usual
    itk_option remove
    Label Options
    imosflm controller
    set font
    namespace code
    git 之五分钟教程
    git 之五分钟教程
    学习perl正则表达式
  • 原文地址:https://www.cnblogs.com/bigtreei/p/9156330.html
Copyright © 2020-2023  润新知