Skip to content

Commit

Permalink
Add fluent email priority setter.
Browse files Browse the repository at this point in the history
  • Loading branch information
KKSzymanowski committed Aug 31, 2016
1 parent 33bc764 commit 0311c15
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Illuminate/Mail/Mailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

1 comment on commit 0311c15

@mattstauffer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.