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\第一课\01.txt',r'D:\test\第一课\02.txt'] mail.send(to=to,cc=cc,subject=subject,contents=content,attachments=files)
python中yagmail发送邮件模块
最新推荐文章于 2025-01-09 16:47:11 发布