pazz/alot

Make forward --attach work for e-mail w/ attachments

maertsen opened this issue · 5 comments

Steps taken:

  • select an e-mail containing one or more attachments in the thread view
  • forward e-mail using :forward --attach

Expected behaviour:

  • e-mail forwarded contains attachments

Actual behaviour:

  • e-mail does not contain attachments, seemingly only the text contained in the original e-mail

I think this has to do with https://github.com/pazz/alot/blob/master/alot/commands/thread.py#L313 using 'email_as_string', and my intuition says we should instead wrap the original, although I'm too unfamiliar with mime to be sure what to do instead and/or whether this is already part of the existing code base. Pointers or workarounds would be appreciated, I always feel bad when having to switch to a webclient merely to forward an e-mail... :-)

pazz commented

thanks for bringing this up. I have no idea how the constructed mail should look like exactly tbh.
The biggest problem here is to find that out, by reading rfc's and looking at the behaviuour of other mail clients. If you find something out, please document it here, even if you dont fix it yourself!
thx

Okay, so I have had limited time to look into this, but a quick search yields at least some bits based on thunderbird bugzilla:

It would be good to know what e.g. mutt, popular webmail clients do.

pazz commented

* thunderbird wraps the original message with a message/rfc822
Content-Type

IIRC, this is what alot does when you use forward --attach.

Tested with 7e70624 (release v0.6) and this functionality works.
@pazz, feel free to close this issue.

pazz commented

thanks