Reply-by-email from Outlook drops everything after a numbered list

Self-hosted, 2026.1.5 (commit 2727e4d). We run a community in mailing-list mode and take replies by email.

A member replied from Outlook with a fairly long post, and the copy that showed up on the site — and went back out to the list — was cut off partway through. Everything from their first numbered list onward was just gone. No error, nothing in the logs, the post simply ended mid-sentence.

What threw me at first: the bullet lists earlier in the same email came through fine. Only the numbered list got chopped, plus everything after it.

It’s extract_from_word in lib/email/receiver.rb. For Outlook/Word mail it treats the first child of .WordSection1 that isn’t a or as the start of a signature or forwarded message, and removes it along with every sibling after it:

elided =
doc.css(
“.WordSection1 > :not(p):not(ul):first-of-type, .WordSection1 > :not(p):not(ul):first-of-type ~ *”,
).remove

Outlook renders numbered lists as , and the selector doesn’t exclude ol. So the numbered list is the first “not p, not ul” element, and the receiver cuts the message right there. Bullet lists () are excluded, which is why those survive and the numbered one doesn’t.

Repro

  1. From Outlook (desktop), reply to a notification. Write a paragraph, then a numbered list, then another paragraph.
  2. The created post keeps the text down to the numbered list and drops the list and everything below it.

Minimal HTML body that triggers it (easy to drop into a receiver spec):

Intro paragraph.

Steps:

  1. First
  2. Second

This trailing paragraph disappears too.

You get back just the two intro paragraphs.

Still present on main — the selector hasn’t changed. I searched the bug category first and didn’t find this one already filed.

Suggested fix

Treat the same as , since a numbered list is content, not a signature:

“.WordSection1 > :not(p):not(ul):not(ol):first-of-type, .WordSection1 > :not(p):not(ul):not(ol):first-of-type ~ *”

That keeps the list and still elides the real signature/forward markers (tables, divs, hr, images). Happy to open a PR with a fixture email and a failing spec if that’s helpful.

1 Like

Hmm, could you try updating your site first? Since your version isn’t the lastest, this could have been fixed along the way.

Hmmm. The Discourse status in my admin says I am up to date and running the latest. Really odd.

So I see I am running on the latest of the ESR. I have a workaround for the moment. I have a lot of plugins written, and with a work around, I’m not going to risk a high traffic production server to test. I’ll just have to wait until I upgrade later and see if it was fixed.

Whoops, perhaps I misread the releases list. Yes, I think your version is still supported.

Do you have an example of such email we could use to make reproduction (and thus fixing) easier? Feel free to PM me an .eml file (with PII data redacted).

As a new user, I can’t upload a file. And I have been searching everywhere and cannot see where I can send you a DM, so that may also be disabled. Sorry to make this difficult.

I bumped your trust level so you should be able to click on my avatar and see a Message button :wink:

Done. thank you. Appreciated