diff options
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r-- | alot/commands/thread.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 646a45bd..1d694f94 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -401,19 +401,10 @@ class BounceMailCommand(Command): """directly re-send selected message""" repeatable = True - def __init__(self, message=None, **kwargs): - """ - :param message: message to bounce (defaults to selected message) - :type message: `alot.db.message.Message` - """ - self.message = message - super().__init__(**kwargs) - async def apply(self, ui): - # get mail to bounce - if not self.message: - self.message = ui.current_buffer.get_selected_message() - mail = self.message.get_email() + message = ui.current_buffer.get_selected_message() + mail = email.message_from_bytes(message.as_bytes(), + policy = email.policy.SMTP) # look if this makes sense: do we have any accounts set up? my_accounts = settings.get_accounts() |