zoukankan      html  css  js  c++  java
  • 发邮件

    import yagmail

    username = '104628703@qq.com'
    password = 'sdg34234' #免费的邮箱,这里用授权码,一般自己公司的,直接写邮箱密码就行了。
    smtp = 'smtp.qq.com'


    mail = yagmail.SMTP(user=username,password=password,host=smtp)

    to = ['974219141@qq.com','511402865@qq.com','104628703@qq.com','540493450@qq.com']
    cc = ['690942492@qq.com','931279527@qq.com','525586735@qq.com']

    subject = '交作业'
    content = '下节课交作业,不然发红包!'
    files = [r'/Users/nhy/PycharmProjects/cnz/day5/student.xlsx',
    r'/Users/nhy/PycharmProjects/cnz/day5/删除三天前的日志.py']
    mail.send(to=to,cc=cc,subject=subject,contents=content,
    attachments=files)
  • 相关阅读:
    vue 加载更多2
    vue 加载更多
    js获取浏览器信息
    iscroll
    git fetch
    input file accept类型
    git从安装到使用
    sass中的循环判断条件语句
    animation
    vue2+animate.css
  • 原文地址:https://www.cnblogs.com/Dorami/p/11098227.html
Copyright © 2011-2022 走看看