python从mymailbox.msg获取邮件信息,,import rfc82
文章由Byrx.net分享于2019-03-23 09:03:07
python从mymailbox.msg获取邮件信息,,import rfc82
import rfc822mailbox_filename = "mymailbox.msg"file_handle = open("mailbox_filename")messagedic = rfc822.Message(file_handle)content_type = messagedic["content-type"]from_field = messagedic["From"]to_field = messagedic.getaddr("To")subject_field = messagedic["Subject"]file_handle.close()print content_type, from_field, to_field, subject_field
相关内容
- python中访问类的docstring注释的方法,pythondocstring,class
- python一句代码实现全排列,python一句代码,from itertoo
- PyQt界面中用twisted建立server,pyqttwistedserver,这两天在看
- 用pyui4win给python添加动画界面,,这是用开源项目pyui4
- 使用python下载网页上的flash,pythonflash,'''Created o
- Python 兔子毒药问题,python兔子毒药,大致是这样的:1
- python对字典进行排序,python字典排序,1、 准备知识:在
- python解析远程web页面,python解析web,import htmll
- 打印杨辉三角形,杨辉三角形,Python语言: py
- python计算两个日期相差的天数,python天数,#两个日期相
评论关闭