summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/envelope.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 75e531ee..81e34486 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -109,7 +109,7 @@ class EnvelopeSendCommand(Command):
def afterwards(returnvalue):
ui.clear_notify([clearme])
- if returnvalue is 'success': # sucessfully send mail
+ if returnvalue == 'success': # sucessfully send mail
cmd = BufferCloseCommand(buffer=envelope)
ui.apply_command(cmd)
ui.notify('mail send successful')
@@ -120,13 +120,7 @@ class EnvelopeSendCommand(Command):
write_fd = ui.mainloop.watch_pipe(afterwards)
def thread_code():
- ui.logger.debug('THREAD:SEND')
- ret = account.send_mail(mail)
- ui.logger.debug('THREAD:SEND')
- os.write(write_fd, ret or 'success')
-
- ui.logger.debug('STARTING THREAD')
- #thread_code()
+ os.write(write_fd, account.send_mail(mail) or 'success')
thread = threading.Thread(target=thread_code)
thread.start()