Skip to content

Commit

Permalink
Make use of $to in doCallback consistent, see #2305
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Apr 8, 2021
1 parent be427db commit 08cf13b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PHPMailer.php
Expand Up @@ -1976,7 +1976,7 @@ protected function smtpSend($header, $body)
$isSent = true;
}

$callbacks[] = ['issent' => $isSent, 'to' => $to[0]];
$callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]];
}
}

Expand All @@ -1997,7 +1997,7 @@ protected function smtpSend($header, $body)
foreach ($callbacks as $cb) {
$this->doCallback(
$cb['issent'],
[$cb['to']],
[[$cb['to'], $cb['name']]],
[],
[],
$this->Subject,
Expand Down

0 comments on commit 08cf13b

Please sign in to comment.