You are here

public function HTMLMailMime::setTxtBody in HTML Mail 8

Same name and namespace in other branches
  1. 8.3 src/Utility/HtmlMailMime.php \Drupal\htmlmail\Utility\HtmlMailMime::setTxtBody()

Set the text/plain part of the message.

Parameters

string $data: Either the text/plain data or the name of a file containing data.

bool $is_file: (optional) TRUE if $data is a filename. Defaults to FALSE.

bool $append: (optional) TRUE to append the data to the exiting text/plain part, or FALSE to overwrite existing data. Defaults to FALSE.

Return value

bool TRUE if successful; otherwise FALSE.

File

src/Utility/HTMLMailMime.php, line 160
Provides the MailMIME class for creating MIME-formatted email messages.

Class

HTMLMailMime
Class HTMLMailMime.

Namespace

Drupal\htmlmail\Utility

Code

public function setTxtBody($data, $is_file = FALSE, $append = FALSE) {
  $txt_body = parent::setTXTBody($data, $is_file, $append);
  return self::successful($txt_body);
}