python-emlimporter/EmlHelper.py
2018-06-03 15:24:52 +02:00

18 lines
286 B
Python

'''
@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