mirror of
https://github.com/processwire/processwire.git
synced 2025-08-08 15:57:01 +02:00
Fix issue processwire/processwire-issues#68 to workaround apparent PHP 7.1 mail() bug
This commit is contained in:
@@ -450,7 +450,12 @@ class WireMail extends WireData implements WireMailInterface {
|
||||
foreach($this->to as $to) {
|
||||
$toName = $this->mail['toName'][$to];
|
||||
if($toName) $to = $this->bundleEmailAndName($to, $toName); // bundle to "User Name <user@example.com"
|
||||
if(@mail($to, $this->encodeSubject($this->subject), $body, $header, $param)) $numSent++;
|
||||
$subject = $this->encodeSubject($this->subject);
|
||||
if($param) {
|
||||
if(@mail($to, $subject, $body, $header, $param)) $numSent++;
|
||||
} else {
|
||||
if(@mail($to, $subject, $body, $header)) $numSent++;
|
||||
}
|
||||
}
|
||||
|
||||
return $numSent;
|
||||
|
Reference in New Issue
Block a user