if ($this->SingleTo
) { foreach ($this->SingleToArray
as $toAddr) { $mail = @
popen($sendmail, 'w'
);
if (!
$mail) { throw new Exception($this->
lang('execute'
) .
$this->Sendmail, self::STOP_CRITICAL
);
} $this->
edebug("To: {
$toAddr}"
);
fwrite($mail, 'To: ' .
$toAddr . "\n"
);
fwrite($mail,
$header);
fwrite($mail,
$body);
$result =
pclose($mail);
$addrinfo =
static::
parseAddresses($toAddr, true,
$this->CharSet
);
$this->
doCallback( ($result === 0
),
[[$addrinfo['address'
],
$addrinfo['name'
]]],
$this->cc,
$this->bcc,
$this->Subject,
$body,
$this->From,
[] );
$this->
edebug("Result: " .
($result === 0 ? 'true' : 'false'
));