continue drafting mail handler

This commit is contained in:
Dennis Eichhorn 2020-12-19 20:31:52 +01:00
parent 91fde08f52
commit b7131f34e1
2 changed files with 8 additions and 15 deletions

View File

@ -1292,8 +1292,8 @@ class Email implements MessageInterface
return '';
}
$fileBuffer = file_get_contents($path);
if (false === $fileBuffer) {
$fileBuffer = \file_get_contents($path);
if ($fileBuffer === false) {
return '';
}

View File

@ -322,8 +322,6 @@ class MailHandler
default:
return false;
}
return false;
}
/**
@ -361,11 +359,8 @@ class MailHandler
\fwrite($con, $mail->bodyMime);
$result = \pclose($con);
if ($result !== 0) {
return false;
}
return true;
return $result === 0;
}
/**
@ -391,7 +386,10 @@ class MailHandler
//This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
// CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
$params = null;
if (!empty($mail->sender) && EmailValidator::isValid($mail->sender) && StringUtils::isShellSafe($mail->sender)) {
if (!empty($mail->sender)
&& EmailValidator::isValid($mail->sender)
&& StringUtils::isShellSafe($mail->sender)
) {
$params = \sprintf('-f%s', $mail->sender);
}
@ -400,7 +398,6 @@ class MailHandler
\ini_set('sendmail_from', $mail->sender);
}
$result = false;
$result = $this->mailPassthru($to, $mail, $header, $params);
if (isset($oldFrom)) {
@ -478,11 +475,7 @@ class MailHandler
$this->smtp->close();
}
if (!empty($badRcpt)) {
return false;
}
return true;
return empty($badRcpt);
}
/**