public function PHPMailer::isHTML

5.x PHPMailer.php public PHPMailer::isHTML($isHtml = true)

Sets message type to HTML or plain.

Parameters

bool $isHtml True for HTML mode:

1 call to PHPMailer::isHTML()
PHPMailer::msgHTML in inc/PHPMailer/src/PHPMailer.php
Create a message body from an HTML string. Automatically inlines images and creates a plain-text version by converting the HTML, overwriting any existing values in Body and AltBody. Do not source $message content from user input! $basedir is prepended…

File

inc/PHPMailer/src/PHPMailer.php, line 882

Class

PHPMailer
PHPMailer - PHP email creation and transport class.

Namespace

PHPMailer\PHPMailer

Code

public function isHTML($isHtml = true) 
 {
  if ($isHtml) {
    $this->ContentType = static::CONTENT_TYPE_TEXT_HTML;
  }
  else {
    $this->ContentType = static::CONTENT_TYPE_PLAINTEXT;
  }
}