PHPMailer\PHPMailer\PHPMailer::mailPassthru PHP Method

mailPassthru() private method

Also, unless sendmail_path points to sendmail (or something that claims to be sendmail), don't pass params (not a perfect fix, but it will do)
private mailPassthru ( string $to, string $subject, string $body, string $header, string $params ) : boolean
$to string To
$subject string Subject
$body string Message Body
$header string Additional Header(s)
$params string Params
return boolean
    private function mailPassthru($to, $subject, $body, $header, $params)
    {
        //Check overloading of mail function to avoid double-encoding
        if (ini_get('mbstring.func_overload') & 1) {
            $subject = $this->secureHeader($subject);
        } else {
            $subject = $this->encodeHeader($this->secureHeader($subject));
        }
        if (!$this->UseSendmailOptions) {
            $result = @mail($to, $subject, $body, $header);
        } else {
            $result = @mail($to, $subject, $body, $header, $params);
        }
        return $result;
    }