diff --git a/smart.py b/smart.py index b5db4ee..6f27207 100644 --- a/smart.py +++ b/smart.py @@ -5,9 +5,9 @@ import fileinput import os import email -archiveDir = '/var/www/html/reports/' +archiveDir = '/var/www/html/' -rawEmail = sys.stdin.read().decode('utf-8') +rawEmail = sys.stdin.read() emailObject = email.message_from_string(rawEmail) @@ -24,4 +24,4 @@ for part in emailObject.walk(): if not os.path.isfile(filePath): fp = open(filePath, 'wb') fp.write(part.get_payload(decode=True)) - fp.close() \ No newline at end of file + fp.close()