Incoming emails getting rejected with NoBodyDetectedError


(David Taylor) #1

We have a category of our Discourse instance set up as a “mailbox” for incoming emails (making use of the “Custom incoming email address” setting). This is working great, except for when two people send us an email with the same subject.

What I’d like is for Discourse to just create a new thread for each email, and I have “Allow topics with identical, duplicate titles.” turned on. What actually happens is that the second email gets rejected with a Email::Receiver::NoBodyDetectedError error. When I click on this error in the admin panel, I can clearly see content in the “body” box.

Is there something I can do to make this work? Or is it a bug?


(Régis Hanol) #2

Are you sure it’s the same subject that’s triggering that issue? Usually, this error happens when we can’t extract a body from the email.


(David Taylor) #3

Ah… sorry, the same subject thing may have been a red herring. But we are still getting a lot of emails rejected. This is what I see when I click the error, and there’s obviously content in the “body” box… is there a way of getting more info so I can work out why discourse can’t extract the content?


(Régis Hanol) #4

Can you send me the raw emails via PM?


(David Taylor) #5

I can do, but how do I access the raw email? Do you just want the content of the boxes I screenshotted above?


Cannot parse email correctly: another case
(Régis Hanol) #6

Ok, this is a bit convoluted but here’s how to get the raw version of the email

  • open the network tab of your browser’s console
  • click the name of the error (this should open the modal)
  • look for a network request that looks like http://your.discourse/admin/email/incoming/<id>.json
  • add “/raw” before “.json” like so http://your.discourse/admin/email/incoming/<id>/raw.json