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

Breadcrumb

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

function MailboxListHeader::tokenNeedsEncoding

Redefine the encoding requirements for addresses.

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/MailboxListHeader.php, line 132

Class

MailboxListHeader
A Mailbox list MIME Header for something like From, To, Cc, and Bcc (one or more named addresses).

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