mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
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
This commit is contained in:
parent
c3f95bc410
commit
9de54aedb5
5 changed files with 12 additions and 12 deletions
|
@ -153,9 +153,9 @@ EODOC
|
|||
$adapter_doc_name));
|
||||
|
||||
$placeholder_description = $this->deformat(pht(<<<EODOC
|
||||
When sending a message that has no To recipient (i.e. all recipients are CC'd,
|
||||
for example when multiplexing mail), set the To field to the following value. If
|
||||
no value is set, messages with no To will have their CCs upgraded to To.
|
||||
When sending a message that has no To recipient (i.e. all recipients are CC'd),
|
||||
set the To field to the following value. If no value is set, messages with no
|
||||
To will have their CCs upgraded to To.
|
||||
EODOC
|
||||
));
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ final class PhabricatorMailImplementationPHPMailerAdapter
|
|||
$this->mailer->Encoding = $encoding;
|
||||
|
||||
// By default, PHPMailer sends one mail per recipient. We handle
|
||||
// multiplexing higher in the stack, so tell it to send mail exactly
|
||||
// like we ask.
|
||||
// combining or separating To and Cc higher in the stack, so tell it to
|
||||
// send mail exactly like we ask.
|
||||
$this->mailer->SingleTo = false;
|
||||
|
||||
$mailer = PhabricatorEnv::getEnvConfig('phpmailer.mailer');
|
||||
|
|
|
@ -22,8 +22,8 @@ class PhabricatorMailImplementationPHPMailerLiteAdapter
|
|||
$this->mailer->Encoding = $encoding;
|
||||
|
||||
// By default, PHPMailerLite sends one mail per recipient. We handle
|
||||
// multiplexing higher in the stack, so tell it to send mail exactly
|
||||
// like we ask.
|
||||
// combining or separating To and Cc higher in the stack, so tell it to
|
||||
// send mail exactly like we ask.
|
||||
$this->mailer->SingleTo = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -507,8 +507,8 @@ final class PhabricatorMetaMTAMail
|
|||
$add_cc = array();
|
||||
$add_to = array();
|
||||
|
||||
// If multiplexing is enabled, some recipients will be in "Cc"
|
||||
// rather than "To". We'll move them to "To" later (or supply a
|
||||
// If we're sending one mail to everyone, some recipients will be in
|
||||
// "Cc" rather than "To". We'll move them to "To" later (or supply a
|
||||
// dummy "To") but need to look for the recipient in either the
|
||||
// "To" or "Cc" fields here.
|
||||
$target_phid = head(idx($params, 'to', array()));
|
||||
|
@ -847,7 +847,7 @@ final class PhabricatorMetaMTAMail
|
|||
return base64_encode($base);
|
||||
}
|
||||
|
||||
public static function shouldMultiplexAllMail() {
|
||||
public static function shouldMailEachRecipient() {
|
||||
return PhabricatorEnv::getEnvConfig('metamta.one-mail-per-recipient');
|
||||
}
|
||||
|
||||
|
@ -1290,7 +1290,7 @@ final class PhabricatorMetaMTAMail
|
|||
private function loadPreferences($target_phid) {
|
||||
$viewer = PhabricatorUser::getOmnipotentUser();
|
||||
|
||||
if (self::shouldMultiplexAllMail()) {
|
||||
if (self::shouldMailEachRecipient()) {
|
||||
$preferences = id(new PhabricatorUserPreferencesQuery())
|
||||
->setViewer($viewer)
|
||||
->withUserPHIDs(array($target_phid))
|
||||
|
|
|
@ -14,7 +14,7 @@ final class PhabricatorEmailFormatSettingsPanel
|
|||
}
|
||||
|
||||
public function isUserPanel() {
|
||||
return PhabricatorMetaMTAMail::shouldMultiplexAllMail();
|
||||
return PhabricatorMetaMTAMail::shouldMailEachRecipient();
|
||||
}
|
||||
|
||||
public function isManagementPanel() {
|
||||
|
|
Loading…
Reference in a new issue