Skip to content

Commit

Permalink
chore: review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SychO9 committed Nov 8, 2024
1 parent 9127401 commit a081a3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/core/src/Mail/MutateEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ class MutateEmail
{
public function handle(MessageSending $event): bool
{
if (! empty($event->data['unsubscribeLink'])) {
$unsubscribeLink = $event->data['unsubscribeLink'] ?? null;

if ($unsubscribeLink) {
$headers = $event->message->getHeaders();

$headers->addTextHeader('List-Unsubscribe', '<'.$event->data['unsubscribeLink'].'>');
$headers->addTextHeader('List-Unsubscribe', '<'.$unsubscribeLink.'>');
}

return true;
Expand Down

0 comments on commit a081a3b

Please sign in to comment.