@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

don't add email addresses to CC if they are already in TO

Summary:
Some mailers remove the duplicate entries themselves, but some (Mailgun) don't.
This affects installations with metamta.one-mail-per-recipient set to false, and will cause
- ugly looking "to" entries. Gmail, for example, collapses to+cc entries to one list, so you get something that looks like "to: me me john"
- It sometimes causes duplicate delivery of the same message when used in conjuction with Google Groups. I suspect that their message de-dup mechanism is confused by it (I fuzzed it directly with Mailgun, and saw the same message delivered twice - once directly through mailgun, and bounced again through Google Groups). This doesn't happen when the entries are not duplicated.

Test Plan: Created some tasks. Added subscribers. Things seem to work reasonably well.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9978

authored by

Tal Shiri and committed by
epriestley
570a78d4 bd3c239d

+1 -1
+1 -1
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 606 606 } 607 607 608 608 $add_to = array_unique($add_to); 609 - $add_cc = array_unique($add_cc); 609 + $add_cc = array_diff(array_unique($add_cc), $add_to); 610 610 611 611 $mailer->addTos($add_to); 612 612 if ($add_cc) {