Remove Symfony notifier priority

心不动则不痛 提交于 2020-11-30 02:03:43

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!