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

Breadcrumb

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

function Email::ensureValidity

Overrides Message::ensureValidity

File

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

Class

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

Namespace

Symfony\Component\Mime

Code

public function ensureValidity() : void {
    $this->ensureBodyValid();
    if ('1' === $this->getHeaders()
        ->getHeaderBody('X-Unsent')) {
        throw new LogicException('Cannot send messages marked as "draft".');
    }
    parent::ensureValidity();
}
RSS feed
Powered by Drupal