python STMP
2016-03-31 23:23
447 查看
import smtplib from email.header import Header from email.mime.text import MIMEText server = smtplib.SMTP('smtp.163.com', 25) server.login('18818261892@163.com', 'LBQ139196') msg = MIMEText('hello, send by Python...', 'plain', 'utf-8') msg['From'] = '18818261892@163.com <18818261892@163.com>' msg['Subject'] = Header(u'text', 'utf8').encode() msg['To'] = u'飞轮海 <1848406889@qq.com>' server.sendmail('18818261892@163.com', ['1848406889@qq.com'], msg.as_string())
相关文章推荐
- Python 2.7 学习笔记 面向对象的编程
- Python CSV Reader/Writer 例子
- 每天一篇python:时间日期篇
- python之邮件操作
- python语言学习1——初识python
- Python 标准库—— datetime(运行时间的判断)
- 《机器学习实战》——k-近邻算法Python实现问题记录
- python3中的mysql数据库操作
- python指南笔记(1)
- 升级pip8.1.1出现错误,因为安装目录有中文
- python 中的编码问题总结
- numpy.percentile
- Python for Data Analysis
- 借助 ptpython 三个命令实现终端下 PySpark 代码高亮和代码补全:
- 2016.3.31Python函数的参数
- 安装使用jupyter(原来的Ipython notebook)
- Python 中的列表排序函数
- python勿使用mutable值作为默认参数
- python运算符优先级
- python运算符基础实例