Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15424682
D10883.id26141.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D10883.id26141.diff
View Options
diff --git a/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php b/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
--- a/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
+++ b/src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
@@ -100,6 +100,12 @@
EODOC
));
+ $email_preferences_description = $this->deformat(pht(<<<EODOC
+You can disable the email preference link in emails if users prefer smaller
+emails.
+EODOC
+));
+
$re_prefix_description = $this->deformat(pht(<<<EODOC
Mail.app on OS X Lion won't respect threading headers unless the subject is
prefixed with "Re:". If you enable this option, Phabricator will add "Re:" to
@@ -257,6 +263,14 @@
))
->setSummary(pht('Show "To:" and "Cc:" footer hints in email.'))
->setDescription($recipient_hints_description),
+ $this->newOption('metamta.email-preferences', 'bool', true)
+ ->setBoolOptions(
+ array(
+ pht('Show Email Preferences Link'),
+ pht('No Email Preferences Link'),
+ ))
+ ->setSummary(pht('Show email preferences link in email.'))
+ ->setDescription($email_preferences_description),
$this->newOption('metamta.precedence-bulk', 'bool', false)
->setBoolOptions(
array(
diff --git a/src/applications/metamta/view/PhabricatorMetaMTAMailBody.php b/src/applications/metamta/view/PhabricatorMetaMTAMailBody.php
--- a/src/applications/metamta/view/PhabricatorMetaMTAMailBody.php
+++ b/src/applications/metamta/view/PhabricatorMetaMTAMailBody.php
@@ -179,6 +179,23 @@
return $this;
}
+ /**
+ * Add a section with a link to email preferences.
+ *
+ * @return this
+ * @task compose
+ */
+ public function addEmailPreferenceSection() {
+ if (!PhabricatorEnv::getEnvConfig('metamta.email-preferences')) {
+ return $this;
+ }
+
+ $href = PhabricatorEnv::getProductionURI(
+ '/settings/panel/emailpreferences/');
+ $this->addLinkSection(pht('EMAIL PREFERENCES'), $href);
+
+ return $this;
+ }
/**
* Add an attachment.
diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
@@ -1899,6 +1899,8 @@
$body->addReplySection($reply_section);
}
+ $body->addEmailPreferenceSection();
+
$template
->setFrom($this->getActingAsPHID())
->setSubjectPrefix($this->getMailSubjectPrefix())
@@ -2013,7 +2015,6 @@
throw new Exception('Capability not supported.');
}
-
/**
* @task mail
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 23, 11:52 PM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7387492
Default Alt Text
D10883.id26141.diff (2 KB)
Attached To
Mode
D10883: Add email preference links to email footers
Attached
Detach File
Event Timeline
Log In to Comment