fix: Correct sendmail_path validation to ensure proper formatting for sender address

This commit is contained in:
SirLouen 2025-12-09 01:37:34 +01:00
parent 14e1efe293
commit 0d4c5ee8da
No known key found for this signature in database
GPG Key ID: 87796BFBFE09911B
1 changed files with 1 additions and 1 deletions

View File

@ -2111,7 +2111,7 @@ class PHPMailer
}
if (!empty($this->Sender) && static::validateAddress($this->Sender)) {
$phpmailer_path = ini_get('sendmail_path');
if (self::isShellSafe($this->Sender) && strpos($phpmailer_path, '-f') === false) {
if (self::isShellSafe($this->Sender) && strpos($phpmailer_path, ' -f') === false) {
$params = sprintf('-f%s', $this->Sender);
}
$old_from = ini_get('sendmail_from');