python自动发邮件库yagmail

# -*- coding:utf-8 -*-

import yagmail

# 绑定邮箱服务器  password为QQ授权码

yag = yagmail.SMTP(user="[email protected]", password="xbactuhfqxwgbigb", host="smtp.qq.com")

# 邮件标题

subject = ['小可爱,你好']

# 邮箱正文

contents = ['']

# 发送邮件

yag.send('[email protected]', subject, contents)

你可能感兴趣的:(python自动发邮件库yagmail)