remove attachments from directory if card was not created.

pull/16/head
Alex Puiu 2022-02-08 14:19:12 +02:00
rodzic 8d42b8c6d3
commit 27e908f2c3
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -80,6 +80,11 @@ if ($emails)
$response = $newcard->addCard($data, $mailSender, $board);
$mailSender->userId .= "@{$overview->from[0]->host}";
($response) ? $inbox->reply($mailSender->userId, $response) : $inbox->reply($mailSender->userId);
if($response) {
$inbox->reply($mailSender->userId, $response);
} else {
$inbox->reply($mailSender->userId);
foreach($attNames as $attachment) unlink(getcwd() . "/attachments/" . $attachment);
}
}
?>