Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
| Show First 20 Lines • Show All 557 Lines • ▼ Show 20 Lines | try { | ||||
| default: | default: | ||||
| // Just discard. | // Just discard. | ||||
| } | } | ||||
| } | } | ||||
| $body = idx($params, 'body', ''); | $body = idx($params, 'body', ''); | ||||
| $max = PhabricatorEnv::getEnvConfig('metamta.email-body-limit'); | $max = PhabricatorEnv::getEnvConfig('metamta.email-body-limit'); | ||||
| if (strlen($body) > $max) { | if (strlen($body) > $max) { | ||||
| $body = phutil_utf8_shorten($body, $max); | $body = id(new PhutilUTF8StringTruncator()) | ||||
| ->setMaximumBytes($max) | |||||
| ->truncateString($body); | |||||
| $body .= "\n"; | $body .= "\n"; | ||||
| $body .= pht('(This email was truncated at %d bytes.)', $max); | $body .= pht('(This email was truncated at %d bytes.)', $max); | ||||
| } | } | ||||
| $mailer->setBody($body); | $mailer->setBody($body); | ||||
| $html_emails = false; | $html_emails = false; | ||||
| if ($use_prefs && $prefs) { | if ($use_prefs && $prefs) { | ||||
| $html_emails = $prefs->getPreference( | $html_emails = $prefs->getPreference( | ||||
| ▲ Show 20 Lines • Show All 363 Lines • Show Last 20 Lines | |||||