|
|
|
@ -193,10 +193,10 @@ class UploadHandler:
|
|
|
|
|
server.sendmail(message['From'], message['To'], text)
|
|
|
|
|
|
|
|
|
|
# Save copy of sent mail in Sent mailbox
|
|
|
|
|
imap = imaplib.IMAP4_SSL(self.config['MAIL_HOST'], self.config['IMAP_PORT'])
|
|
|
|
|
imap.login(self.config['MAIL_LOGIN'], self.config['MAIL_PASS'])
|
|
|
|
|
imap.append('Sent', '\\Seen', imaplib.Time2Internaldate(time.time()), text.encode('utf8'))
|
|
|
|
|
imap.logout()
|
|
|
|
|
#imap = imaplib.IMAP4_SSL(self.config['MAIL_HOST'], self.config['IMAP_PORT'])
|
|
|
|
|
#imap.login(self.config['MAIL_LOGIN'], self.config['MAIL_PASS'])
|
|
|
|
|
#imap.append('Sent', '\\Seen', imaplib.Time2Internaldate(time.time()), text.encode('utf8'))
|
|
|
|
|
#imap.logout()
|
|
|
|
|
except Exception:
|
|
|
|
|
traceback.print_exc()
|
|
|
|
|
|
|
|
|
|