/** * Set the priority of the mail message * * When not in settings, the value will be 3. If the priority is configured, * but too big, it will be set to 5, which means very low. * * @return void */ protected function setPriority() { $priority = 3; if ($this->typoScript['priority']) { $priority = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->typoScript['priority'], 1, 5); } $this->mailMessage->setPriority($priority); }
/** * Set the priority of the mail message * * When not in settings, the value will be 3. If the priority is configured, * but too big, it will be set to 5, which means very low. * * @return void */ protected function setPriority() { $priority = 3; if (isset($this->typoScript['priority'])) { $priorityFromTs = $this->formUtility->renderItem($this->typoScript['priority.'], $this->typoScript['priority']); } if (!empty($priorityFromTs)) { $priority = MathUtility::forceIntegerInRange($priorityFromTs, 1, 5); } $this->mailMessage->setPriority($priority); }
/** * Add mail priority * * @param MailMessage $message * @return MailMessage */ protected function addPriority(MailMessage $message) { $priorityValue = (int) $this->settings[$this->type]['overwrite']['priority']; if ($priorityValue > 0) { $message->setPriority($priorityValue); } return $message; }