Page MenuHomePhorge
Diviner Tech Docs PhabricatorMetaMTAMailBody

final class PhabricatorMetaMTAMailBody
Phorge 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 __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

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