astroid icon indicating copy to clipboard operation
astroid copied to clipboard

[request] Cannot correctly reply: html emails are always snipped

Open amshafer opened this issue 3 years ago • 3 comments

Overall I am loving astroid, but one particular issue keeps biting me: when replying to html email the contents of the html email are not quoted in the drafted reply.

Normally when replying I see something like:

Excerpts from <person I'm replying to>:
> Contents of their previous email.
> The text from their emails is here like usual
> and I can reply to it.
>> previous previous thread contents
>>> and so on and so forth

But I'm noticing with html emails when I hit reply instead of seeing the previous email contents I see:

Excerpts from <person I'm replying to>:
> 

This means I lose all the context of the previous thread(s), and makes it impossible to reply without snipping the thread. The behavior I expect is for astroid to grab the text from the html email and let me respond to it, including the thread context from all ancestor emails.

I don't think this should be hard to reproduce, just have your friend using outlook send you a html email and try replying to it. I am running a checkout of this repo from a few weeks ago, so I should be relatively up to date.

Is this a known issue, are there any workarounds? Anyone else observing this? I don't mind getting my hands dirty trying to fix this but I will probably need some direction.

amshafer avatar Jul 20 '21 14:07 amshafer

I had this issue also recently. Here's how I made it work:

thread_view.preferred_type = "plain"
thread_view.preferred_html_only = true

If you would like to compare your config with mine, have a look here

mxmehl avatar Jul 20 '21 14:07 mxmehl

Thanks! Will thread_view.preferred_html_only = true send all email as html though? I'd like to keep everything I send as plain text

amshafer avatar Jul 20 '21 15:07 amshafer

No, that's defined via preferred_type AFAIK.

Also see https://github.com/astroidmail/astroid/wiki/Configuration-Reference#undocumented

mxmehl avatar Jul 20 '21 16:07 mxmehl