Persist excluded recipients when saving mail
Summary:
Fixes T5185. The fundamental issue is that this excludePHIDs property was not saved, so the logic went like this:
- Generate excludePHIDs correctly.
- Pass excludePHIDs through the stack.
- Perform some other computations correctly.
- Queue the mail for the daemons, throwing it away.
- Daemons process mail with empty excludePHIDs list.
Store it in the persistent properties array instead.
Also remove the "override self mail" thing, since it's only used by bin/mail send-test and suffers from the same issue. I think it's too useless to fix, since even if you get caught by it, bin/mail makes it clear why the message was dropped.
Test Plan:
Notable:
- exclude present in properties
- Exclusion reason under RECIPIENTS header
{P1229}
Reviewers: btrahan
Reviewed By: btrahan
Subscribers: epriestley
Maniphest Tasks: T5185
Differential Revision: https://secure.phabricator.com/D10234