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

Add email preference links to email footers

Summary: Ref T1217, Add link to email preferences to email template

Test Plan: Add comment to object like Maniphest task, check that email has a footer with a link to email preferences.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T1217

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

authored by

lkassianik and committed by
epriestley
f7aa8731 6dc29724

+33 -1
+14
src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
··· 100 100 EODOC 101 101 )); 102 102 103 + $email_preferences_description = $this->deformat(pht(<<<EODOC 104 + You can disable the email preference link in emails if users prefer smaller 105 + emails. 106 + EODOC 107 + )); 108 + 103 109 $re_prefix_description = $this->deformat(pht(<<<EODOC 104 110 Mail.app on OS X Lion won't respect threading headers unless the subject is 105 111 prefixed with "Re:". If you enable this option, Phabricator will add "Re:" to ··· 257 263 )) 258 264 ->setSummary(pht('Show "To:" and "Cc:" footer hints in email.')) 259 265 ->setDescription($recipient_hints_description), 266 + $this->newOption('metamta.email-preferences', 'bool', true) 267 + ->setBoolOptions( 268 + array( 269 + pht('Show Email Preferences Link'), 270 + pht('No Email Preferences Link'), 271 + )) 272 + ->setSummary(pht('Show email preferences link in email.')) 273 + ->setDescription($email_preferences_description), 260 274 $this->newOption('metamta.precedence-bulk', 'bool', false) 261 275 ->setBoolOptions( 262 276 array(
+17
src/applications/metamta/view/PhabricatorMetaMTAMailBody.php
··· 179 179 return $this; 180 180 } 181 181 182 + /** 183 + * Add a section with a link to email preferences. 184 + * 185 + * @return this 186 + * @task compose 187 + */ 188 + public function addEmailPreferenceSection() { 189 + if (!PhabricatorEnv::getEnvConfig('metamta.email-preferences')) { 190 + return $this; 191 + } 192 + 193 + $href = PhabricatorEnv::getProductionURI( 194 + '/settings/panel/emailpreferences/'); 195 + $this->addLinkSection(pht('EMAIL PREFERENCES'), $href); 196 + 197 + return $this; 198 + } 182 199 183 200 /** 184 201 * Add an attachment.
+2 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 1899 1899 $body->addReplySection($reply_section); 1900 1900 } 1901 1901 1902 + $body->addEmailPreferenceSection(); 1903 + 1902 1904 $template 1903 1905 ->setFrom($this->getActingAsPHID()) 1904 1906 ->setSubjectPrefix($this->getMailSubjectPrefix()) ··· 2012 2014 protected function buildReplyHandler(PhabricatorLiskDAO $object) { 2013 2015 throw new Exception('Capability not supported.'); 2014 2016 } 2015 - 2016 2017 2017 2018 /** 2018 2019 * @task mail