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)
Fri, Oct 25, 9:52 AM
Unknown Object (File)
Oct 17 2024, 4:28 AM
Unknown Object (File)
Oct 16 2024, 10:32 PM
Unknown Object (File)
Oct 15 2024, 2:26 PM
Unknown Object (File)
Oct 9 2024, 8:36 AM
Unknown Object (File)
Oct 1 2024, 2:16 PM
Unknown Object (File)
Sep 24 2024, 4:01 PM
Unknown Object (File)
Sep 15 2024, 7:12 AM
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