Python 发送邮件

import yamail

password="amyli1499"
host="smtp.163.com"  #smtp.qq.com
user="meiyanshandong@163.com"
to = ["zhangmeiyan01@renmaitech.com"]
cc = ["549541889@qq.com"]
def send_mail(subject,content,files=None):
smtp = yamail.SMTP(host=host,
user=user,
password=password,
)
smtp.send(to=to, cc=cc, subject=subject, contents=content, attachments=files)

if __name__ == "__main__":
file= '../Mia.jpg'
send_mail("sub test","新年好",file)
上一篇:extjs学习笔记--混合型集合 Ext.util.MixedCollection


下一篇:[MSDN] 使用 SharePoint 2013 中的 JavaScript 库代码完成基本操作