wp-includes/PHPMailer/PHPMailer.php:998Extract sendmail path and parse to deal with known parameters.
$sendmailPathstringstring private function parseSendmailPath($sendmailPath) { $sendmailPath = trim((string)$sendmailPath); if ($sendmailPath === '') { return $sendmailPath; } $parts = preg_split('/\s+/', $sendmailPath); if (empty($parts)) { return $sendmailPath; } $command = array_shift($parts); $remainder = []; // Parse only -t, -i, -oi and -f parameters. for ($i = 0; $i < count($parts); ++$i) { $part = $parts[$i]; if (preg_match('/^-(i|oi|t)$/', $part, $matches)) { continue; } if (preg_match('/^-f(.*)$/', $part, $matches)) { $address = $matches[1]; if ($address === '' && isset($parts[$i + 1]) && strpos($parts[$i + 1], '-') !== 0) { $address = $parts[++$i]; } $this->Sender = $address; continue; } $remainder[] = $part; } // The params that are not parsed are added back to the command. if (!empty($remainder)) { $command .= ' ' . implode(' ', $remainder); } return $command; }Unchanged from 7.0.4 through 7.1.0.
Signature, return type and hooks compared across 2 parsed releases.
src/wp-includes/PHPMailer/PHPMailer.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.