@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.

Remove inconsistent and confusing use of the term "multiplex" in mail

Summary:
Ref T13053. Because I previously misunderstood what "multiplex" means, I used it in various contradictory and inconsistent ways.

We can send mail in two ways: either one mail to everyone with a big "To" and a big "Cc" (not default; better for mailing lists) or one mail to each recipient with just them in "To" (default; better for almost everything else).

"Multiplexing" is combining multiple signals over a single channel, so it more accurately describes the big to/cc. However, it is sometimes used to descibe the other approach. Since it's ambiguous and I've tainted it through misuse, get rid of it and use more clear language.

(There's still some likely misuse in the SMS stuff, and a couple of legitimate uses in other contexts.)

Test Plan: Grepped for `multiplex`, saw less of it.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13053

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

+12 -12
+3 -3
src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
··· 153 153 $adapter_doc_name)); 154 154 155 155 $placeholder_description = $this->deformat(pht(<<<EODOC 156 - When sending a message that has no To recipient (i.e. all recipients are CC'd, 157 - for example when multiplexing mail), set the To field to the following value. If 158 - no value is set, messages with no To will have their CCs upgraded to To. 156 + When sending a message that has no To recipient (i.e. all recipients are CC'd), 157 + set the To field to the following value. If no value is set, messages with no 158 + To will have their CCs upgraded to To. 159 159 EODOC 160 160 )); 161 161
+2 -2
src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerAdapter.php
··· 19 19 $this->mailer->Encoding = $encoding; 20 20 21 21 // By default, PHPMailer sends one mail per recipient. We handle 22 - // multiplexing higher in the stack, so tell it to send mail exactly 23 - // like we ask. 22 + // combining or separating To and Cc higher in the stack, so tell it to 23 + // send mail exactly like we ask. 24 24 $this->mailer->SingleTo = false; 25 25 26 26 $mailer = PhabricatorEnv::getEnvConfig('phpmailer.mailer');
+2 -2
src/applications/metamta/adapter/PhabricatorMailImplementationPHPMailerLiteAdapter.php
··· 22 22 $this->mailer->Encoding = $encoding; 23 23 24 24 // By default, PHPMailerLite sends one mail per recipient. We handle 25 - // multiplexing higher in the stack, so tell it to send mail exactly 26 - // like we ask. 25 + // combining or separating To and Cc higher in the stack, so tell it to 26 + // send mail exactly like we ask. 27 27 $this->mailer->SingleTo = false; 28 28 } 29 29
+4 -4
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
··· 507 507 $add_cc = array(); 508 508 $add_to = array(); 509 509 510 - // If multiplexing is enabled, some recipients will be in "Cc" 511 - // rather than "To". We'll move them to "To" later (or supply a 510 + // If we're sending one mail to everyone, some recipients will be in 511 + // "Cc" rather than "To". We'll move them to "To" later (or supply a 512 512 // dummy "To") but need to look for the recipient in either the 513 513 // "To" or "Cc" fields here. 514 514 $target_phid = head(idx($params, 'to', array())); ··· 847 847 return base64_encode($base); 848 848 } 849 849 850 - public static function shouldMultiplexAllMail() { 850 + public static function shouldMailEachRecipient() { 851 851 return PhabricatorEnv::getEnvConfig('metamta.one-mail-per-recipient'); 852 852 } 853 853 ··· 1290 1290 private function loadPreferences($target_phid) { 1291 1291 $viewer = PhabricatorUser::getOmnipotentUser(); 1292 1292 1293 - if (self::shouldMultiplexAllMail()) { 1293 + if (self::shouldMailEachRecipient()) { 1294 1294 $preferences = id(new PhabricatorUserPreferencesQuery()) 1295 1295 ->setViewer($viewer) 1296 1296 ->withUserPHIDs(array($target_phid))
+1 -1
src/applications/settings/panel/PhabricatorEmailFormatSettingsPanel.php
··· 14 14 } 15 15 16 16 public function isUserPanel() { 17 - return PhabricatorMetaMTAMail::shouldMultiplexAllMail(); 17 + return PhabricatorMetaMTAMail::shouldMailEachRecipient(); 18 18 } 19 19 20 20 public function isManagementPanel() {