Page MenuHomePhabricator

Add basic support for mail "stamps" to improve client mail routing
ClosedPublic

Authored by epriestley on Feb 4 2018, 5:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 7:03 PM
Unknown Object (File)
Tue, Dec 10, 8:21 PM
Unknown Object (File)
Fri, Dec 6, 4:21 PM
Unknown Object (File)
Thu, Dec 5, 11:01 PM
Unknown Object (File)
Thu, Dec 5, 8:41 PM
Unknown Object (File)
Thu, Dec 5, 1:43 AM
Unknown Object (File)
Thu, Nov 28, 4:17 AM
Unknown Object (File)
Sun, Nov 24, 12:42 PM
Subscribers
None

Details

Summary

Ref T10448. Currently, we use "mail tags" (in SettingsEmail Preferences) to give users some ability to route mail. There are a number of major issues with this:

  • It isn't modular and can't be extended by third-party applications.
  • The UI is a giant mess of 5,000 individual settings.
  • Settings don't map clearly to actual edits.
  • A lot of stuff isn't covered by any setting.

This adds a new system, called "mail stamps", which is similar to "mail tags" but tries to fix all these problems.

I called these "stamps" because: stamps make sense with mail; we can't throw away the old system just yet and need to keep it around for a bit; we don't use this term for anything else; it avoids confusion with project tags.

(Conceptually, imagine these as ink stamps like "RETURN TO SENDER" or "FRAGILE", not actual postage stamps.)

The only real "trick" here is that later versions of this will need to enumerate possible stamps for an object and maybe all possible stamps for all objects in the system. This is why stamp generation is separated into a "template" phase and a "value" phase. In future changes, the "template" phase can be used on its own to generate documentation and typeaheads and let users build rules. This may need some more refinement before it really works since I haven't built any of that yet.

Also adds a preference for getting stamps in the header only (default) or header and body (better for Gmail, which can't route based on headers).

Test Plan

Fiddled with preference, sent some mail and saw a "STAMPS" setting in the body and an "X-Phabricator-Stamps" header.

Screen Shot 2018-02-04 at 9.38.16 AM.png (1×1 px, 165 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable