Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Email.php

function Email::html

Parameters

resource|string|null $body:

Return value

$this

File

vendor/symfony/mime/Email.php, line 301

Class

Email
@author Fabien Potencier <fabien@symfony.com>

Namespace

Symfony\Component\Mime

Code

public function html($body, string $charset = 'utf-8') : static {
    if (null !== $body && !\is_string($body) && !\is_resource($body)) {
        throw new \TypeError(\sprintf('The body must be a string, a resource or null (got "%s").', get_debug_type($body)));
    }
    $this->cachedBody = null;
    $this->html = $body;
    $this->htmlCharset = $charset;
    return $this;
}
RSS feed
Powered by Drupal