Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
| <?php | <?php | ||||
| final class PhabricatorMetaMTAConfigOptions | final class PhabricatorMetaMTAConfigOptions | ||||
| extends PhabricatorApplicationConfigOptions { | extends PhabricatorApplicationConfigOptions { | ||||
| public function getName() { | public function getName() { | ||||
| return pht("Mail"); | return pht('Mail'); | ||||
| } | } | ||||
| public function getDescription() { | public function getDescription() { | ||||
| return pht("Configure Mail."); | return pht('Configure Mail.'); | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| $send_as_user_desc = $this->deformat(pht(<<<EODOC | $send_as_user_desc = $this->deformat(pht(<<<EODOC | ||||
| When a user takes an action which generates an email notification (like | When a user takes an action which generates an email notification (like | ||||
| commenting on a Differential revision), Phabricator can either send that mail | commenting on a Differential revision), Phabricator can either send that mail | ||||
| "From" the user's email address (like "alincoln@logcabin.com") or "From" the | "From" the user's email address (like "alincoln@logcabin.com") or "From" the | ||||
| 'metamta.default-address' address. | 'metamta.default-address' address. | ||||
| ▲ Show 20 Lines • Show All 182 Lines • ▼ Show 20 Lines | return array( | ||||
| ->setSummary(pht('Control how mail is sent.')) | ->setSummary(pht('Control how mail is sent.')) | ||||
| ->setDescription($adapter_description), | ->setDescription($adapter_description), | ||||
| $this->newOption( | $this->newOption( | ||||
| 'metamta.one-mail-per-recipient', | 'metamta.one-mail-per-recipient', | ||||
| 'bool', | 'bool', | ||||
| true) | true) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Send Mail To Each Recipient"), | pht('Send Mail To Each Recipient'), | ||||
| pht("Send Mail To All Recipients"), | pht('Send Mail To All Recipients'), | ||||
| )) | )) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht( | pht( | ||||
| 'Controls whether Phabricator sends one email with multiple '. | 'Controls whether Phabricator sends one email with multiple '. | ||||
| 'recipients in the "To:" line, or multiple emails, each with a '. | 'recipients in the "To:" line, or multiple emails, each with a '. | ||||
| 'single recipient in the "To:" line.')) | 'single recipient in the "To:" line.')) | ||||
| ->setDescription($one_mail_per_recipient_desc), | ->setDescription($one_mail_per_recipient_desc), | ||||
| $this->newOption('metamta.can-send-as-user', 'bool', false) | $this->newOption('metamta.can-send-as-user', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Send as User Taking Action"), | pht('Send as User Taking Action'), | ||||
| pht("Send as Phabricator"), | pht('Send as Phabricator'), | ||||
| )) | )) | ||||
| ->setSummary( | ->setSummary( | ||||
| pht( | pht( | ||||
| 'Controls whether Phabricator sends email "From" users.')) | 'Controls whether Phabricator sends email "From" users.')) | ||||
| ->setDescription($send_as_user_desc), | ->setDescription($send_as_user_desc), | ||||
| $this->newOption( | $this->newOption( | ||||
| 'metamta.reply-handler-domain', | 'metamta.reply-handler-domain', | ||||
| 'string', | 'string', | ||||
| 'phabricator.example.com') | 'phabricator.example.com') | ||||
| ->setDescription(pht( | ->setDescription(pht( | ||||
| 'Domain used for reply email addresses. Some applications can '. | 'Domain used for reply email addresses. Some applications can '. | ||||
| 'configure this domain.')), | 'configure this domain.')), | ||||
| $this->newOption('metamta.reply.show-hints', 'bool', true) | $this->newOption('metamta.reply.show-hints', 'bool', true) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Show Reply Handler Hints"), | pht('Show Reply Handler Hints'), | ||||
| pht("No Reply Handler Hints"), | pht('No Reply Handler Hints'), | ||||
| )) | )) | ||||
| ->setSummary(pht('Show hints about reply handler actions in email.')) | ->setSummary(pht('Show hints about reply handler actions in email.')) | ||||
| ->setDescription($reply_hints_description), | ->setDescription($reply_hints_description), | ||||
| $this->newOption('metamta.herald.show-hints', 'bool', true) | $this->newOption('metamta.herald.show-hints', 'bool', true) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Show Herald Hints"), | pht('Show Herald Hints'), | ||||
| pht("No Herald Hints"), | pht('No Herald Hints'), | ||||
| )) | )) | ||||
| ->setSummary(pht('Show hints about Herald rules in email.')) | ->setSummary(pht('Show hints about Herald rules in email.')) | ||||
| ->setDescription($herald_hints_description), | ->setDescription($herald_hints_description), | ||||
| $this->newOption('metamta.recipients.show-hints', 'bool', true) | $this->newOption('metamta.recipients.show-hints', 'bool', true) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht("Show Recipient Hints"), | pht('Show Recipient Hints'), | ||||
| pht("No Recipient Hints"), | pht('No Recipient Hints'), | ||||
| )) | )) | ||||
| ->setSummary(pht('Show "To:" and "Cc:" footer hints in email.')) | ->setSummary(pht('Show "To:" and "Cc:" footer hints in email.')) | ||||
| ->setDescription($recipient_hints_description), | ->setDescription($recipient_hints_description), | ||||
| $this->newOption('metamta.precedence-bulk', 'bool', false) | $this->newOption('metamta.precedence-bulk', 'bool', false) | ||||
| ->setBoolOptions( | ->setBoolOptions( | ||||
| array( | array( | ||||
| pht('Add "Precedence: bulk" Header'), | pht('Add "Precedence: bulk" Header'), | ||||
| pht('No "Precedence: bulk" Header'), | pht('No "Precedence: bulk" Header'), | ||||
| ▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines | |||||