Added support for side-by-side HTML and plaintext email building.
We can control if the HTML stuff is sent by by a new config, metamta.html-emails
Differential D9375
HTML emails talshiri on Jun 4 2014, 8:35 PM. Authored by Tags None Referenced Files
Subscribers Tokens
Details
Added support for side-by-side HTML and plaintext email building. We can control if the HTML stuff is sent by by a new config, metamta.html-emails Been running this in our deployment for a few months now. Well behaved clients
Bad clients
Need testing
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions Is there any interest in this patch? Comment Actions We're likely 'sorta' interested in it, but not likely to find time to review/support it for a while. Our main concern will likely be support costs to the upstream. Comment Actions @chad: yeah, that's fair. It also needs testing across more email clients to verify that it doesn't break replies and threading. Comment Actions added support for colorized diffs for inline comments Comment Actions Awesome! Can you arc patch D9375 locally and see if:
Comment Actions Will be back at a windows machine tomorrow, and definitely test this part
I don't currently have an inbound email setup configured, but I'll see what I can do here Comment Actions Actually I think I can test the rendering with something like litmus, so it should be pretty easy to verify this one. The main thing that needs testing is the reply by mail. Do you happen to have a Mailgun/AWS/Sendgrid account? Comment Actions
Comment Actions Some really nitpicky inlines. Some of the handling of HTML looks like it should be broken to me. In particular, I would expect treating phutil_tag()s like strings to produce too much escaping. I think the HTML APIs should use the HTML rendering code (i.e., accept phutil_tag(), not plain strings), and this mostly does that correctly, but I would expect stuff like this: $body->addRawHTMLSection(implode('<br>', $html_headers)); ...to fail (applying too much escaping). Let me poke at this locally and see if I'm crazy...
Comment Actions It looks like this narrowly escapes actually breaking anything, but the handling isn't quite correct, and will break if we make minor changes in the future (like wrapping the entire mail body in a <div> to apply styling in renderHTML(). See inlines to clean this up.
Comment Actions Also, let's put an explicit caveat on the option in the settings panel about it being beta/not-expected-to-work-perfectly.
Comment Actions Yeah, just remove the check against the config option for now. Once this is stable we can add the option and default it to true (unless we discover that, say, several common clients have major problems we aren't able to fix, in which case we might default it to false).
Comment Actions One inline. I'll tweak that in the pull if it seems to wokr.
|