0
点赞
收藏
分享

微信扫一扫

python给邮箱自动发送内容

zhoulujun 2022-02-10 阅读 70

import yagmail

链接邮箱服务器

yag = yagmail.SMTP(user=“hupo4210@163.com”, password=“EKFDBLAKHNHUZIMR”, host=‘smtp.163.com’)

邮箱正文

contents = [‘This is the body, and here is just text http://somedomain/image.png’,
‘You can find an audio file attached.’, ‘/local/path/song.mp3’]

发送邮件

yag.send(‘598987781@qq.com’, ‘subject’, contents)

举报

相关推荐

0 条评论