FIX: Skip upload if HTML cannot be parsed (PR #12971)

GitHub

Could we have a test here?

Unfortunately no. I have seen this issue in our logs and I cannot explain why it happens. I tried with the exact same mail strings, but locally it works. It might be a combination of settings or other preconditions that lead to this.

Awesome, thanks!