1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +01:00

Don't add "To/Cc" to HTML mail bodies if there's no HTML mail body

Summary: Ref T6576. This avoids generating almost-empty HTML mail bodies for mail which incorrectly has no HTML body.

Test Plan: Generated some mail locally; the specific hook case is a pain for me to hit right now. Will push and dig in if that doesn't fix it.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T6576

Differential Revision: https://secure.phabricator.com/D10863
This commit is contained in:
epriestley 2014-11-17 13:43:02 -08:00
parent 657b36dd06
commit ba778cffd7

View file

@ -210,8 +210,10 @@ abstract class PhabricatorMailReplyHandler {
$body .= $this->getRecipientsSummary($to_handles, $cc_handles);
$html_body = $mail_template->getHTMLBody();
$html_body .= hsprintf('%s',
$this->getRecipientsSummaryHTML($to_handles, $cc_handles));
if (strlen($html_body)) {
$html_body .= hsprintf('%s',
$this->getRecipientsSummaryHTML($to_handles, $cc_handles));
}
foreach ($recipients as $phid => $recipient) {