邮件自动群发代码

  

  

下面一米智能邮件群发软件来给大家分享一下邮件自动群发代码。


邮件自动群发代码


smtp_host:smtp.qq.com腾讯发送邮箱的smtp服务地址,多个收件人的话,接收者可以用list

smtp_port:465腾讯发送邮箱的端口

mail 发件的内容,包含主题、正文、附件等

server 发送邮件人的相关信息,如账号,密码,smtp_host, smtp_port

receiver 接收者的邮箱地址

content_html 发送正文为html

content_text 发送正文

attachments带附件

server.send_mail([ ' yourfriend@example.com ',' 12345 @ example.com ' ],mail)收件人列表

server.send_mail([('Boss','yourfriend@example.com'),'12345@example.com'], mail) 收件人列表,带收件人名字

server.send_mail(['foo@163.com','foo@126.com'],mail,cc=['bar@163.com'])收件人列表,使用抄送

server.send_mail(['foo@163.com','foo@126.com'],mail,cc=[('Boss','bar@163.com'),'bar@126.com'])收件人列表,使用抄送带名字

  
相关资讯