diff --git a/src/Illuminate/Notifications/Channels/MailChannel.php b/src/Illuminate/Notifications/Channels/MailChannel.php index 594320d5b791..fd3a3cc28911 100644 --- a/src/Illuminate/Notifications/Channels/MailChannel.php +++ b/src/Illuminate/Notifications/Channels/MailChannel.php @@ -143,7 +143,7 @@ protected function buildMessage($mailMessage, $notifiable, $notification, $messa $this->addAttachments($mailMessage, $message); if (! is_null($message->priority)) { - $mailMessage->setPriority($message->priority); + $mailMessage->priority($message->priority); } if ($message->tags) { diff --git a/tests/Integration/Notifications/SendingMailNotificationsTest.php b/tests/Integration/Notifications/SendingMailNotificationsTest.php index 053087054057..5fe74775f2ef 100644 --- a/tests/Integration/Notifications/SendingMailNotificationsTest.php +++ b/tests/Integration/Notifications/SendingMailNotificationsTest.php @@ -98,7 +98,7 @@ public function testMailIsSent() $message->shouldReceive('subject')->once()->with('Test Mail Notification'); - $message->shouldReceive('setPriority')->once()->with(1); + $message->shouldReceive('priority')->once()->with(1); $closure($message); @@ -144,7 +144,7 @@ public function testMailIsSentToNamedAddress() $message->shouldReceive('subject')->once()->with('Test Mail Notification'); - $message->shouldReceive('setPriority')->once()->with(1); + $message->shouldReceive('priority')->once()->with(1); $closure($message);