yagmail发送带附件的邮件
Oct. 24, 2018, 5:27 p.m.
read: 1069
摘自知乎
import yagmail
yag = yagmail.SMTP(user='joy_lmx@163.com', password='nicai?', host='smtp.163.com', port='25')
yag.send(user, subject = "I now can send an attachment", attachments=['a.txt', 'b.jpg'])