Skip to content

Commit

Permalink
Change incorrect message, when the sender in the global envelope or t…
Browse files Browse the repository at this point in the history
…he from header of asEmailMessage() is not defined.
  • Loading branch information
fredericlesueurs authored and fabpot committed Oct 1, 2023
1 parent 5ea6266 commit 29700bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Channel/EmailChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function notify(Notification $notification, RecipientInterface $recipient
if ($email instanceof Email) {
if (!$email->getFrom()) {
if (null === $this->from) {
throw new LogicException(sprintf('To send the "%s" notification by email, you should either configure a global "from" header, set a sender in the global "envelope" of the mailer configuration or set a "from" header in the "asEmailMessage()" method.', get_debug_type($notification)));
throw new LogicException(sprintf('To send the "%s" notification by email, you must configure the global "from" header. For this you can set a sender in the global "envelope" of the mailer configuration or set a "from" header in the "asEmailMessage()" method.', get_debug_type($notification)));
}

$email->from($this->from);
Expand Down

0 comments on commit 29700bf

Please sign in to comment.