ITPub博客

首页 > IT职业 > IT生活 > python中有哪些邮件模块

python中有哪些邮件模块

IT生活 作者:mahaijiang 时间:2021-09-11 09:46:07 0 删除 编辑

1、yagmail模块用于发邮件模块。

2、keyring模块可以访问系统密钥环服务。

3、schedule模块用于定时任务执行器。

4、inbox模块的IMA包进行IMAP操作。

实例

import yagmail
username = 'xxxxxx@beegee.org'
password = 'xxxxx'
smtp = 'smtp.exmail.qq.com'
mail = yagmail.SMTP(user=username,password=password,host=smtp)
 
to = ['69xxxxxxx@qq.com']
cc = ['69xxxxxxx@qq.com']
subject = '发红包!'
content = '发红包!'
files = [r'D:test第一课

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3071/viewspace-2827974/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-13

  • 博文量
    76
  • 访问量
    779