diff --git a/api.php b/api.php index 60aa2e2..505e160 100644 --- a/api.php +++ b/api.php @@ -2108,12 +2108,15 @@ switch ($action) { $replyMailbox = $companyConf['mailboxes'][0]; } - // Hae käyttäjän allekirjoitus tälle postilaatikolle + // Hae käyttäjän allekirjoitus tälle postilaatikolle (ellei estetty) + $noSignature = !empty($input['no_signature']); $mailboxId = $replyMailbox['id'] ?? ''; $signature = ''; - $sigUser = dbGetUser($_SESSION['user_id']); - if ($sigUser) { - $signature = trim($sigUser['signatures'][$mailboxId] ?? ''); + if (!$noSignature) { + $sigUser = dbGetUser($_SESSION['user_id']); + if ($sigUser) { + $signature = trim($sigUser['signatures'][$mailboxId] ?? ''); + } } $emailBody = $signature ? $body . "\n\n-- \n" . $signature : $body; diff --git a/index.html b/index.html index 54768c1..35ecef7 100644 --- a/index.html +++ b/index.html @@ -383,6 +383,7 @@ +