问题
Symfony notifier component send email message with priority header [HIGH] that is shown in email subject.
How can I set or remove this priority level?
My notifier.yml :
urgent: ['email']
high: ['email']
medium: ['email']
low: ['email']
I'm using email as transport.
class ClassExampleNotification extends Notification implements EmailNotificationInterface
{
/**
* @var Object
*/
private $obj;
public function __construct(Obj $$obj)
{
$this->obj = $obj;
parent::__construct('Example Subject');
}
public function asEmailMessage(Recipient $recipient, string $transport = null): ?EmailMessage
{
$message = EmailMessage::fromNotification($this, $recipient);
$message->getMessage()
->htmlTemplate('template.html.twig')
->context(['obj' => $this->user]);
return $message;
}
来源:https://stackoverflow.com/questions/64712218/remove-symfony-notifier-priority