Skip to content

Commit

Permalink
Update src/Illuminate/Mail/Message.php
Browse files Browse the repository at this point in the history
Co-authored-by: michael-rubel <contact@observer.name>
  • Loading branch information
driesvints and michael-rubel authored Aug 21, 2021
1 parent c3582c6 commit dbbaaeb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Illuminate/Mail/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ public function returnPath($address)
public function to($address, $name = null, $override = false)
{
if ($override) {
if (is_array($address)) {
$this->email->to(...$address);
} else {
$this->email->to(new Address($address, (string) $name));
}
is_array($address)
? $this->email->to(...$address)
: $this->email->to(new Address($address, (string) $name));

return $this;
}
Expand Down

0 comments on commit dbbaaeb

Please sign in to comment.