Disable stripping emails

(Jared Needell) #1

I have an automated report that gets sent to a discourse category but I noticed discourse is stripping half of it either maybe because it’s HTML or thinking it’s a signature.

I don’t see any option to disable striping signature/text out of incoming emails.

(cpradio) #2

To identify which, can you take the source of the email and paste it into a Discourse Topic manually on your installation?

That will tell you if it is HTML being stripped out or if it is something to do with signature detection (specific to email).

at least I think this will work as a valid test

(Michael Downey) #3


“We don’t strip out user signatures since there’s no standard.” - @zogstrip

(cpradio) #4

Oh yeah, so that probably means it is the HTML then.

(Jared Needell) #5

when I paste the email into a new topic, nothing is getting stripped out.

(cpradio) #6

And you are pasting the HTML and text right, you aren’t just copying the text from your email client and pasting it? As that would be entirely different.

(Jared Needell) #7

I’m opening the raw email and copying the entire body content which includes HTML

(Jared Needell) #8

Anyone able to help with this?

(Michael Downey) #9

Without specifics of the content in question, it will be hard to diagnose.

(Jared Needell) #10


So I did a little more digging, the email reports are emails from our CruiseControl.NET application which return a report of a “build” failure or success after a new build was created.

I noticed a couple things with the email,

  • The html body has a 2nd snippet that Discourse appears to stop reading the email after this point
  • The email uses URL encoding for line feed and new lines (HTML URL Encoding Reference)
    "=0D" and “=0A”.

If I manually remove the 2nd and get rid of the encoding. The output is pretty close to what the email actually looks like.

(Jared Needell) #11

Any way to bypass those quirks and Discourse creates the message?

(Sam Saffron) #12

For starters, can you PM @zogstrip the full source of the problem email.


…but actually there is. Kind of: RFC 3676 - The Text/Plain Format and DelSp Parameters

I use "-- " since like forever. Had set up incoming email in Discourse, just did a test and was now wondering why my signature is not stripped. The above quote seems to explain why this quasi standard is ignored. (sorry, I didn’t find the source of the quote)