Python_发送邮件
时间:2021-06-06 19:32:03
收藏:0
阅读:0
import yamail
username = "xxxxxx@qq.com"
password = "xxxxxx"
host = "smtp.qq.com"
# host = "smtp.163.com" #163
# host = "smtp.126.com" #qq
# smtp.send(to="aaaaaa@qq.com")
smtp = yamail.SMTP(host=host,user=username,password=password)
smtp.send(to=["aaaaaaa@qq.com"],
cc=["ssssssss@qq.com"],
subject="你好呀",
contents="哈哈哈哈",
attachments="qq.xls")
评论(0)