Skip to content

Commit

Permalink
CS
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Aug 22, 2022
1 parent 0bddcf9 commit 53d91d3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/PHPMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1891,13 +1891,14 @@ protected function mailSend($header, $body)
foreach ($this->to as $toaddr) {
$toArr[] = $this->addrFormat($toaddr);
}
$to = implode(', ', $toArr);
$to = trim(implode(', ', $toArr));

//If there are no To-addresses (e.g. when sending only to BCC-addresses)
//the following should be added to get a correct DKIM-signature.
//Compare with $this->preSend()
if(trim($to) == '') { $to = 'undisclosed-recipients:;'; }

if ($to === '') {
$to = 'undisclosed-recipients:;';
}

$params = null;
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
Expand Down

0 comments on commit 53d91d3

Please sign in to comment.