You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use the PHP mail() function for sending a mail and only set BCC recepients than "undisclosed-recipients:;" won't work.
I look into the code and there is a special way for mail in that case. In the method preSend there will be set "undisclosed-recipients:;" to the parameter $this->mailHeader but this parameter will not be used later anymore.
In the method createHeader() "undisclosed-recipients:;" is handled for the other send methods and it works.
As a simple hack I have changed the if in the createHeader() method so that "undisclosed-recipients:;" will be used if mail is used
// To be created automatically by mail()
if ($this->SingleTo === true) {
if ($this->Mailer != 'mail') {
foreach ($this->to as $t) {
$this->SingleToArray[] = $this->addrFormat($t);
}
}
}
else {
if (count($this->to) > 0) {
if ($this->Mailer != 'mail') {
$result .= $this->addrAppend('To', $this->to);
}
} elseif (count($this->cc) == 0) {
$result .= $this->headerLine('To', 'undisclosed-recipients:;');
}
}
The text was updated successfully, but these errors were encountered:
Synchro
added a commit
to Synchro/PHPMailer
that referenced
this issue
Mar 31, 2014
If you use the PHP mail() function for sending a mail and only set BCC recepients than "undisclosed-recipients:;" won't work.
I look into the code and there is a special way for mail in that case. In the method preSend there will be set "undisclosed-recipients:;" to the parameter $this->mailHeader but this parameter will not be used later anymore.
In the method createHeader() "undisclosed-recipients:;" is handled for the other send methods and it works.
As a simple hack I have changed the if in the createHeader() method so that "undisclosed-recipients:;" will be used if mail is used
The text was updated successfully, but these errors were encountered: