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

Breadcrumb

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

function DraftEmail::getPreparedHeaders

Override default behavior as draft emails do not require From/Sender/Date/Message-ID headers. These are added by the client that actually sends the email.

Overrides Message::getPreparedHeaders

File

vendor/symfony/mime/DraftEmail.php, line 33

Class

DraftEmail
@author Kevin Bond <kevinbond@gmail.com>

Namespace

Symfony\Component\Mime

Code

public function getPreparedHeaders() : Headers {
    $headers = clone $this->getHeaders();
    if (!$headers->has('MIME-Version')) {
        $headers->addTextHeader('MIME-Version', '1.0');
    }
    $headers->remove('Bcc');
    return $headers;
}
RSS feed
Powered by Drupal