Skip to content

Commit

Permalink
Ensure an e-mail is valid when creating it (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar authored Jul 17, 2024
1 parent b14e32d commit 89320c5
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 89320c5

Please sign in to comment.