Merge pull request #16 from kidhab/master

Add setting to disable mail notifications
pull/19/head
Alexe Puiu 2022-03-04 12:33:03 +02:00 zatwierdzone przez GitHub
commit 82c869f6ba
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 9 dodań i 4 usunięć

Wyświetl plik

@ -9,4 +9,5 @@ define("MAIL_USER", "incoming");
define("MAIL_PASSWORD", "****");
define("DECODE_SPECIAL_CHARACTERS", true); //requires mbstring, if false special characters (like öäüß) won't be displayed correctly
define("ASSIGN_SENDER", true); // if true, sender will be assigned to card if has NC account
define("MAIL_NOTIFICATION", true); // if true, send notifications when a new card was created or an error occured
?>

Wyświetl plik

@ -90,10 +90,14 @@ if ($emails)
$response = $newcard->addCard($data, $mailSender, $board);
$mailSender->userId .= "@{$overview->reply_to[0]->host}";
if($response) {
$inbox->reply($mailSender->userId, $response);
} else {
$inbox->reply($mailSender->userId);
if(MAIL_NOTIFICATION) {
if($response) {
$inbox->reply($mailSender->userId, $response);
} else {
$inbox->reply($mailSender->userId);
}
}
if(!$response) {
foreach($attNames as $attachment) unlink(getcwd() . "/attachments/" . $attachment);
}
}