Sorting the Array problem in doCallback
This commit is contained in:
parent
800919c6a4
commit
97f4e58e18
|
|
@ -1842,16 +1842,18 @@ class PHPMailer
|
||||||
fwrite($mail, $body);
|
fwrite($mail, $body);
|
||||||
$result = pclose($mail);
|
$result = pclose($mail);
|
||||||
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
||||||
$this->doCallback(
|
foreach ($addrinfo as $addr) {
|
||||||
($result === 0),
|
$this->doCallback(
|
||||||
[[$addrinfo['address'], $addrinfo['name']]],
|
($result === 0),
|
||||||
$this->cc,
|
[[$addr['address'], $addr['name']]],
|
||||||
$this->bcc,
|
$this->cc,
|
||||||
$this->Subject,
|
$this->bcc,
|
||||||
$body,
|
$this->Subject,
|
||||||
$this->From,
|
$body,
|
||||||
[]
|
$this->From,
|
||||||
);
|
[]
|
||||||
|
);
|
||||||
|
}
|
||||||
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
||||||
if (0 !== $result) {
|
if (0 !== $result) {
|
||||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||||
|
|
@ -2017,16 +2019,18 @@ class PHPMailer
|
||||||
foreach ($toArr as $toAddr) {
|
foreach ($toArr as $toAddr) {
|
||||||
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
||||||
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
$addrinfo = static::parseAddresses($toAddr, true, $this->CharSet);
|
||||||
$this->doCallback(
|
foreach ($addrinfo as $addr) {
|
||||||
$result,
|
$this->doCallback(
|
||||||
[[$addrinfo['address'], $addrinfo['name']]],
|
$result,
|
||||||
$this->cc,
|
[[$addr['address'], $addr['name']]],
|
||||||
$this->bcc,
|
$this->cc,
|
||||||
$this->Subject,
|
$this->bcc,
|
||||||
$body,
|
$this->Subject,
|
||||||
$this->From,
|
$body,
|
||||||
[]
|
$this->From,
|
||||||
);
|
[]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
|
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue