python给邮箱自动发送内容

zhoulujun

关注

阅读 70

2022-02-10

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)

0 0 举报