MailChimp mirror 'eats' the mail

Continuing the discussion from Create a read-only mailing list mirror:

I found an occurrence of a parsing error that I think may be useful to fix since it concerns MailChimp. Here is the problem:


When I receive a multi-part MIME message newsletter, instead of having the HTML version displayed, I get a blank message.

The MIME delimiter might be the culprit, although I see no reason why the Mail class would choke on that:

This is a multi-part message in MIME format

Content-Type: text/plain; charset="utf-8"; format="fixed"
Content-Transfer-Encoding: quoted-printable

Here you can see that the multi-part message delimiter starts with -- which is the usual marker for signature, that Discourse may interpret as “stop parsing this, we’re done here”. I guess this is why the resulting post is blank instead of showing the HTML part of the newsletter. But it sounds too crazy to be true.

The first topic post is correctly constructed, with the envelope icon that goes to the raw, text, and HTML parts. But the resulting post is wrong. Copy-pasting the HTML version into the first post fixes the issue, but obviously there’s something wrong in the rendering.


Have you tried changing the incoming mail prefers HTML setting and see if it makes any difference?

Hi Richard! No, it’s already checked:

Maybe the trim_incoming_emails setting is doing something wrong.

If it’s turned on, try turning it off.
And yes, the trim setting would be a good second possible culprit.


After removing both incoming email prefer html and trim incoming email, and rebuilding the post’s HTML, nothing happened. I will leave the settings like this and wait for next incoming email (about two weeks) and see what happens then.