fixed mail sending

This commit is contained in:
Roland Gruber 2020-02-02 20:39:44 +01:00
parent daa2fec5c7
commit c468ba6479
1 changed files with 1 additions and 1 deletions

View File

@ -1370,7 +1370,7 @@ function sendEMail($to, $subject, $text, $headers, $returnPath) {
}
logNewMessage(LOG_DEBUG, "Send mail to $to\n" . $text);
$additionalParams = null;
if (isCommandlineSafeEmailAddress($returnPath)) {
if (!empty($returnPath) && isCommandlineSafeEmailAddress($returnPath)) {
$additionalParams = '-f' . $returnPath;
}
return mail($to, base64EncodeForEMail($subject), $text, $headers, $additionalParams);