18 lines
286 B
Python
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
|
|
|