mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30:56 +01:00
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
This commit is contained in:
parent
bd3c239d5a
commit
570a78d42a
1 changed files with 1 additions and 1 deletions
|
@ -606,7 +606,7 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
|
||||||
}
|
}
|
||||||
|
|
||||||
$add_to = array_unique($add_to);
|
$add_to = array_unique($add_to);
|
||||||
$add_cc = array_unique($add_cc);
|
$add_cc = array_diff(array_unique($add_cc), $add_to);
|
||||||
|
|
||||||
$mailer->addTos($add_to);
|
$mailer->addTos($add_to);
|
||||||
if ($add_cc) {
|
if ($add_cc) {
|
||||||
|
|
Loading…
Reference in a new issue