Page MenuHomePhabricator
Diviner Phabricator Tech Docs PhabricatorMetaMTAMailBody

final class PhabricatorMetaMTAMailBody
Phabricator Technical Documentation (MetaMTA)

Render the body of an application email by building it up section-by-section.

Tasks

Composition

  • public function addRawSection($text) — Add a raw block of text to the email. This will be rendered as-is.
  • public function addTextSection($header, $section) — Add a block of text with a section header. This is rendered like this:
  • public function addAttachment($attachment) — Add an attachment.

Rendering

  • public function render() — Render the email body.
  • public function getAttachments() — Retrieve attachments.
  • private function indent($text) — Indent a block of text for rendering under a section heading.

Other Methods

Methods

public function getViewer()

This method is not documented.
Return
wild

public function setViewer($viewer)

This method is not documented.
Parameters
$viewer
Return
wild

public function setContextObject($context_object)

This method is not documented.
Parameters
$context_object
Return
wild

public function getContextObject()

This method is not documented.
Return
wild

public function addRawSection($text)

Add a raw block of text to the email. This will be rendered as-is.

Parameters
string$textBlock of text.
Return
this

public function addRemarkupSection($header, $text)

This method is not documented.
Parameters
$header
$text
Return
wild

public function addRawPlaintextSection($text)

This method is not documented.
Parameters
$text
Return
wild

public function addRawHTMLSection($html)

This method is not documented.
Parameters
$html
Return
wild

public function addTextSection($header, $section)

Add a block of text with a section header. This is rendered like this:

HEADER
  Text is indented.
Parameters
string$headerHeader text.
string$sectionSection text.
Return
this

public function addPlaintextSection($header, $text, $indent)

This method is not documented.
Parameters
$header
$text
$indent
Return
wild

public function addHTMLSection($header, $html_fragment)

This method is not documented.
Parameters
$header
$html_fragment
Return
wild

public function addLinkSection($header, $link)

This method is not documented.
Parameters
$header
$link
Return
wild

public function addAttachment($attachment)

Add an attachment.

Parameters
PhabricatorMailAttachment$attachmentAttachment.
Return
this

public function render()

Render the email body.

Return
stringRendered body.

public function renderHTML()

This method is not documented.
Return
wild

public function getAttachments()

Retrieve attachments.

Return
list<PhabricatorMailAttachment>Attachments.

private function indent($text)

Indent a block of text for rendering under a section heading.

Parameters
string$textText to indent.
Return
stringIndented text.

private function newMarkupEngine()

This method is not documented.
Return
wild