1. 程式人生 > >Python 發郵件

Python 發郵件

use nic word import pytho python password 郵件 mtp


import yagmail
yag = yagmail.SMTP(user='[email protected]', password='nicai?', host='smtp.163.com', port='25')
yag.send(user, subject = "I now can send an attachment", attachments=['a.txt', 'b.jpg'])

Python 發郵件