Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/adapter/PhabricatorMailTestAdapter.php
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | foreach ($headers as $header) { | ||||
$header_list[] = array( | $header_list[] = array( | ||||
$header->getName(), | $header->getName(), | ||||
$header->getValue(), | $header->getValue(), | ||||
); | ); | ||||
} | } | ||||
$guts['headers'] = $header_list; | $guts['headers'] = $header_list; | ||||
$text_body = $message->getTextBody(); | $text_body = $message->getTextBody(); | ||||
if (strlen($text_body)) { | if (phutil_nonempty_string($text_body)) { | ||||
$guts['body'] = $text_body; | $guts['body'] = $text_body; | ||||
} | } | ||||
$html_body = $message->getHTMLBody(); | $html_body = $message->getHTMLBody(); | ||||
if (strlen($html_body)) { | if (phutil_nonempty_string($html_body)) { | ||||
$guts['html-body'] = $html_body; | $guts['html-body'] = $html_body; | ||||
} | } | ||||
$attachments = $message->getAttachments(); | $attachments = $message->getAttachments(); | ||||
$file_list = array(); | $file_list = array(); | ||||
foreach ($attachments as $attachment) { | foreach ($attachments as $attachment) { | ||||
$file_list[] = array( | $file_list[] = array( | ||||
'data' => $attachment->getData(), | 'data' => $attachment->getData(), | ||||
Show All 19 Lines |