python发邮件
import yamail #发件人信息 send_mail_info=\ { 'host':'smtp.xx.com', 'user':'xx@xx.com', 'password':'xx' } #收件人信息,标题,附件 to_mail_info=\ { 'to':['xx@qq.com','xx@qq.com'],#收件人,多人是列表 'cc':'xx@qq.com',#抄送人,多人是列表 'subject':'python发邮件',#标题 'attachments':'c.txt',#附件 'contents':'正文内容'#正文 } send_mail_smtp = yamail.SMTP(**send_mail_info) send_mail_smtp.send(**to_mail_info) send_mail_smtp.send(to=['xx@qq.com'],cc=['xx@qq.com'],subject='df',attachments='dfdf',contents='dfsdfs',) send_mail_smtp.close()