0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 01:52:15 +02:00
This commit is contained in:
Marcus Bointon 2022-08-22 09:51:34 +02:00 committed by GitHub
parent 0bddcf9141
commit 53d91d3016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1891,13 +1891,14 @@ class PHPMailer
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