diff --git a/src/Illuminate/Mail/Mailable.php b/src/Illuminate/Mail/Mailable.php index f56b2b75349e..c7456863293a 100644 --- a/src/Illuminate/Mail/Mailable.php +++ b/src/Illuminate/Mail/Mailable.php @@ -340,6 +340,23 @@ public function replyTo($address, $name = null) return $this->setAddress($address, $name, 'replyTo'); } + /** + * Set the priority of this message. + * + * The value is an integer where 1 is the highest priority and 5 is the lowest. + * + * @param int $level + * @return $this + */ + public function priority($level = 3) + { + $this->callbacks[] = function ($message) use ($level) { + $message->setPriority($level); + }; + + return $this; + } + /** * Set the recipients of the message. *