Skip to content

Commit

Permalink
Ensure an e-mail is valid when creating it
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed Jul 17, 2024
1 parent edc07e8 commit 35fd535
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Gateway/MailerGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ private function createEmail(Parcel $parcel): Email
$email = new Email();
$emailStamp->applyToEmail($email);

// Validate the e-mail so we throw early enough
$email->ensureValidity();

// Adjust the priority if configured to do so
if (($priority = $parcel->getMessageConfig()->getInt('email_priority')) > 0) {
$email = $email->priority($priority);
Expand Down

0 comments on commit 35fd535

Please sign in to comment.