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

2、keyring模塊可以訪問系統(tǒng)密鑰環(huán)服務(wù)。
3、schedule模塊用于定時(shí)任務(wù)執(zhí)行器。
4、inbox模塊的IMA包進(jìn)行IMAP操作。
實(shí)例
import yagmail username = '[email protected]' password = 'xxxxx' smtp = 'smtp.exmail.qq.com' mail = yagmail.SMTP(user=username,password=password,host=smtp) to = ['[email protected]'] cc = ['[email protected]'] 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電腦。
本文標(biāo)題:創(chuàng)新互聯(lián)Python教程:python中有哪些郵件模塊
文章分享:http://fisionsoft.com.cn/article/dhsssjg.html


咨詢
建站咨詢
