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

Breadcrumb

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

function Email::priority

Sets the priority of this message.

The value is an integer where 1 is the highest priority and 5 is the lowest.

Return value

$this

File

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

Class

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

Namespace

Symfony\Component\Mime

Code

public function priority(int $priority) : static {
    if ($priority > 5) {
        $priority = 5;
    }
    elseif ($priority < 1) {
        $priority = 1;
    }
    return $this->setHeaderBody('Text', 'X-Priority', \sprintf('%d (%s)', $priority, self::PRIORITY_MAP[$priority]));
}
RSS feed
Powered by Drupal