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

Breadcrumb

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

function MailboxHeader::tokenNeedsEncoding

Redefine the encoding requirements for an address.

All "specials" must be encoded as the full header value will not be quoted

Overrides AbstractHeader::tokenNeedsEncoding

See also

RFC 2822 3.2.1

File

vendor/symfony/mime/Header/MailboxHeader.php, line 81

Class

MailboxHeader
A Mailbox MIME Header for something like Sender (one named address).

Namespace

Symfony\Component\Mime\Header

Code

protected function tokenNeedsEncoding(string $token) : bool {
    return preg_match('/[()<>\\[\\]:;@\\,."]/', $token) || parent::tokenNeedsEncoding($token);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal