python 发邮件抄送,暗送(cc,bcc)代码,pythonbcc,python发邮件要抄送
python 发邮件抄送,暗送(cc,bcc)代码,pythonbcc,python发邮件要抄送
python发邮件要抄送或者暗送,只需要设置message的CC和BCC对应的值即可,如下代码示例:
toaddr = '[email protected]'cc = ['[email protected]','[email protected]']bcc = ['[email protected]']fromaddr = '[email protected]'message_subject = "disturbance in sector 7"message_text = "Three are dead in an attack in the sewers below sector 7."message = "From: %s\r\n" % fromaddr + "To: %s\r\n" % toaddr + "CC: %s\r\n" % ",".join(cc) + "BCC: %s\r\n" % ",".join(bcc) + "Subject: %s\r\n" % message_subject + "\r\n" + message_texttoaddrs = [toaddr] + cc + bccserver = smtplib.SMTP('smtp.byrx.net')server.set_debuglevel(1)server.sendmail(fromaddr, toaddrs, message)server.quit()
相关内容
- python发邮件例子,python发邮件,来自python官方的例
- python官方示例发送带附件邮件,python官方示例附件,下面
- python发送html格式邮件,python发送html,#!/usr/bin/e
- BeautifulSoup解析人人好友状态,beautifulsoup解析,#!/usr/bi
- 定时关机神器,定时关机神,有了它,你以后再也不为深
- 简单SVM分类器的开源实现,核心代码150行,svm150行,一个
- python在linux系统下获取系统内存使用情况,pythonlinux,"
- 抓取乌云会员信息,抓取会员信息,抓取乌云网站白帽子
- 元类 metaclass,metaclass,python 可以生成任
- python 获取ip代理地址,python获取ip代理,# -*- coding
评论关闭