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
Unknown Object (File)
Sun, Apr 21, 4:09 PM
Unknown Object (File)
Sat, Apr 20, 12:29 AM
Unknown Object (File)
Fri, Apr 19, 7:46 PM
Unknown Object (File)
Wed, Apr 17, 3:12 PM
Unknown Object (File)
Tue, Apr 16, 6:38 PM
Unknown Object (File)
Thu, Apr 11, 7:20 AM
Unknown Object (File)
Tue, Apr 2, 4:52 PM
Unknown Object (File)
Thu, Mar 28, 6:28 PM
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