python-emlimporter/EmlHelper.py

18 lines
286 B
Python
Raw Permalink Normal View History

2018-06-03 13:24:52 +00:00
'''
@author: Klaus-Uwe Mitterer
'''
import email
class EmlHelper(object):
@staticmethod
def readFile(file_path):
f=None
try:
f=open(file_path)
except IOError as e:
print 'Unable to open file. {0}'.format(e)
msg=email.message_from_file(f)
f.close()
return msg