新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)Python教程:python中有哪些郵件模塊
1、yagmail模塊用于發(fā)郵件模塊。

2、keyring模塊可以訪問系統(tǒng)密鑰環(huán)服務(wù)。
3、schedule模塊用于定時任務(wù)執(zhí)行器。
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 = '發(fā)紅包!' content = '發(fā)紅包!' files = [r'D:\test\第一課\01.txt',r'D:\test\第一課\02.txt'] mail.send(to=to,cc=cc,subject=subject,contents=content,attachments=files)
以上就是python中郵件模塊的介紹,希望對大家有所幫助。更多Python學(xué)習(xí)指路:創(chuàng)新互聯(lián)Python教程
本文教程操作環(huán)境:windows7系統(tǒng)、Python 3.9.1,DELL G3電腦。
分享名稱:創(chuàng)新互聯(lián)Python教程:python中有哪些郵件模塊
網(wǎng)址分享:http://www.dlmjj.cn/article/dhsssjg.html


咨詢
建站咨詢
