Commit c0975d27 authored by Carsten  Rose's avatar Carsten Rose
Browse files

General error: fix problem with unitialised variable. Update manual.

parent 750a3f02
Pipeline #1326 passed with stage
in 2 minutes and 15 seconds
......@@ -69,10 +69,10 @@ class SendMail {
if (!empty($redirectAllMail)) {
$addBody = "All QFQ outgoing mails are caught and redirected to you." . PHP_EOL . "Original receiver(s) are ..." . PHP_EOL;
$addBody .= 'TO: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER]??'' . PHP_EOL;
$addBody .= 'CC: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER_CC]??'' . PHP_EOL;
$addBody .= 'BCC: ' . $mailConfig[SENDMAIL_TOKEN_RECEIVER_BCC]??'' . PHP_EOL;
$addBody .= 'SENDER: ' . $mailConfig[SENDMAIL_TOKEN_SENDER]??'' . PHP_EOL;
$addBody .= 'TO: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER]??'') . PHP_EOL;
$addBody .= 'CC: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER_CC]??'') . PHP_EOL;
$addBody .= 'BCC: ' . ($mailConfig[SENDMAIL_TOKEN_RECEIVER_BCC]??'') . PHP_EOL;
$addBody .= 'SENDER: ' . ($mailConfig[SENDMAIL_TOKEN_SENDER]??'') . PHP_EOL;
$addBody .= PHP_EOL . "==========================================" . PHP_EOL . PHP_EOL;
// Check if the given body is a HTML body.
......@@ -234,20 +234,21 @@ class SendMail {
if (!($perms & 0x0040)) {
chmod($sendEmail, 0755);
clearstatcache();
if(!is_file($sendEmail) || is_readable($sendEmail)){
throw new UserFormException(json_encode([ERROR_MESSAGE_TO_USER => "Command 'sendEmail' not found."
, ERROR_MESSAGE_SUPPORT => $sendEmail]), ERROR_SENDMAIL);
}
$output = Support::qfqExec($cmd, $rc);
if(is_executable($sendEmail)){
throw new UserFormException(json_encode([ERROR_MESSAGE_TO_USER => "Command 'sendEmail' not executable."
, ERROR_MESSAGE_SUPPORT => $sendEmail]), ERROR_SENDMAIL);
}
if($rc!=0){
if(!is_file($sendEmail) || !is_readable($sendEmail)){
throw new UserFormException(json_encode([ERROR_MESSAGE_TO_USER => "Command 'sendEmail' not found."
, ERROR_MESSAGE_SUPPORT => $sendEmail]), ERROR_SENDMAIL);
}
$output = Support::qfqExec($cmd, $rc);
if(!is_executable($sendEmail)){
throw new UserFormException(json_encode([ERROR_MESSAGE_TO_USER => "Command 'sendEmail' not executable."
, ERROR_MESSAGE_SUPPORT => $sendEmail]), ERROR_SENDMAIL);
}
}
}
if ($rc != 0) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment