public function setTextBody($text) {
    if (!is_string($text)) {
      $error = sprintf("Plain text given is not a string (Actual type: %s).",
                       gettype($text));
      throw new \InvalidArgumentException($error);
    }
    $this->message->setTextbody($text);
  }
public function setTextBody($text) {
    if (!is_string($text)) {
      $error = sprintf("Plain text given is not a string (Actual type: %s).",
                       gettype($text));
      throw new \InvalidArgumentException($error);
    }
    $this->message->setTextbody($text);
  }
public function setTextBody ( $ text ) { if ( ! is_string ( $ text ) ) { $ error = sprintf ( "Plain text given is not a string (Actual type: %s)." , gettype ( $ text ) ) ; throw new \ InvalidArgumentException ( $ error ) ; } $ this -> message -> setTextbody ( $ text ) ; }
Sets plain text for the email body.

@param string $text Plain text to add.
@return bool True if successful, false otherwise.
@throws \InvalidArgumentException If text is not a string.
Sets plain text for the email body .