fix: Correct sendmail path check logic in PHPMailer class

This commit is contained in:
SirLouen 2025-12-07 02:00:54 +01:00
parent 96d82b913a
commit 31e3d491aa
No known key found for this signature in database
GPG Key ID: 87796BFBFE09911B
1 changed files with 1 additions and 1 deletions

View File

@ -2063,7 +2063,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');