Sorting the Array problem in doCallback
This commit is contained in:
parent
81eedda461
commit
34c6423ac6
|
|
@ -1829,9 +1829,10 @@ class PHPMailer
|
|||
fwrite($mail, $body);
|
||||
$result = pclose($mail);
|
||||
$addrinfo = static::parseAddresses($toAddr, null, $this->CharSet);
|
||||
foreach ($addrinfo as $addr) {
|
||||
$this->doCallback(
|
||||
($result === 0),
|
||||
[[$addrinfo['address'], $addrinfo['name']]],
|
||||
[[$addr['address'], $addr['name']]],
|
||||
$this->cc,
|
||||
$this->bcc,
|
||||
$this->Subject,
|
||||
|
|
@ -1839,6 +1840,7 @@ class PHPMailer
|
|||
$this->From,
|
||||
[]
|
||||
);
|
||||
}
|
||||
$this->edebug("Result: " . ($result === 0 ? 'true' : 'false'));
|
||||
if (0 !== $result) {
|
||||
throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
|
||||
|
|
@ -2004,9 +2006,10 @@ class PHPMailer
|
|||
foreach ($toArr as $toAddr) {
|
||||
$result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
|
||||
$addrinfo = static::parseAddresses($toAddr, null, $this->CharSet);
|
||||
foreach ($addrinfo as $addr) {
|
||||
$this->doCallback(
|
||||
$result,
|
||||
[[$addrinfo['address'], $addrinfo['name']]],
|
||||
[[$addr['address'], $addr['name']]],
|
||||
$this->cc,
|
||||
$this->bcc,
|
||||
$this->Subject,
|
||||
|
|
@ -2015,6 +2018,7 @@ class PHPMailer
|
|||
[]
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
|
||||
$this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []);
|
||||
|
|
|
|||
Loading…
Reference in New Issue