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

Have HTML mails return to and cc lines

Summary: Fixes T6525, adds cc and tos to html emails

Test Plan: send html and plain emails, see new stuff

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6525

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

+30 -1
+30 -1
src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php
··· 124 124 return $body; 125 125 } 126 126 127 + final public function getRecipientsSummaryHTML( 128 + array $to_handles, 129 + array $cc_handles) { 130 + assert_instances_of($to_handles, 'PhabricatorObjectHandle'); 131 + assert_instances_of($cc_handles, 'PhabricatorObjectHandle'); 132 + 133 + if (PhabricatorEnv::getEnvConfig('metamta.recipients.show-hints')) { 134 + $body = array(); 135 + if ($to_handles) { 136 + $body[] = phutil_tag('strong', array(), 'To: '); 137 + $body[] = phutil_implode_html(', ', mpull($to_handles, 'getName')); 138 + $body[] = phutil_tag('br'); 139 + } 140 + if ($cc_handles) { 141 + $body[] = phutil_tag('strong', array(), 'Cc: '); 142 + $body[] = phutil_implode_html(', ', mpull($cc_handles, 'getName')); 143 + $body[] = phutil_tag('br'); 144 + } 145 + return phutil_tag('div', array(), $body); 146 + } else { 147 + return ''; 148 + } 149 + 150 + } 151 + 127 152 final public function multiplexMail( 128 153 PhabricatorMetaMTAMail $mail_template, 129 154 array $to_handles, ··· 184 209 $body .= "\n"; 185 210 $body .= $this->getRecipientsSummary($to_handles, $cc_handles); 186 211 187 - foreach ($recipients as $phid => $recipient) { 212 + $html_body = $mail_template->getHTMLBody(); 213 + $html_body .= hsprintf('%s', 214 + $this->getRecipientsSummaryHTML($to_handles, $cc_handles)); 188 215 216 + foreach ($recipients as $phid => $recipient) { 189 217 190 218 $mail = clone $mail_template; 191 219 if (isset($to_handles[$phid])) { ··· 198 226 } 199 227 200 228 $mail->setBody($body); 229 + $mail->setHTMLBody($html_body); 201 230 202 231 $reply_to = null; 203 232 if (!$reply_to && $this->supportsPrivateReplies()) {