diff --git a/email/Mailer.php b/email/Mailer.php index 6d66112f6..ba5dda1d4 100644 --- a/email/Mailer.php +++ b/email/Mailer.php @@ -224,7 +224,7 @@ class Mailer extends Object { $to = $this->validEmailAddr($to); // Try it without the -f option if it fails - if(!($result = @mail($to, $subject, $fullBody, $headers, escapeshellarg("-f$bounceAddress")))) { + if(!$bounceAddress || !($result = @mail($to, $subject, $fullBody, $headers, escapeshellarg("-f$bounceAddress")))) { $result = mail($to, $subject, $fullBody, $headers); }