Page MenuHomePhabricator

Respect "metamta.email-body-limit" when building mail HTML bodies
ClosedPublic

Authored by epriestley on Jun 12 2018, 5:01 PM.
Tags
None
Referenced Files
F15490277: D19489.id46605.diff
Fri, Apr 11, 3:56 PM
F15490234: D19489.id46612.diff
Fri, Apr 11, 3:32 PM
F15486161: D19489.id.diff
Thu, Apr 10, 5:22 AM
F15483828: D19489.diff
Wed, Apr 9, 2:42 PM
F15483336: D19489.diff
Wed, Apr 9, 11:51 AM
F15458503: D19489.diff
Mon, Mar 31, 4:08 AM
F15453532: D19489.id46605.diff
Sat, Mar 29, 12:28 PM
F15425287: D19489.diff
Sun, Mar 23, 3:49 AM
Subscribers
None

Details

Summary

Ref T13151. See T11767. See PHI686. Although we limit outbound mail text bodies, the limit doesn't currently apply to attachments, HTML bodies, or headers. T11767 discusses improving this in the general case.

In the wild, an install hit an issue (see PHI686) where edits to Phriction pages generate very large HTML bodies. Check and respect the limit when building HTML bodies.

If we don't have enough room for the HTML body, we just drop it. We have the text body to fall back to, and HTML is difficult to truncate safely.

Test Plan

Added unit tests and made them pass.

Diff Detail

Repository
rP Phabricator
Branch
htmlmail1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20411
Build 27719: Run Core Tests
Build 27718: arc lint + arc unit