UX-parannukset postilaatikon asetuksiin
- Poista SMTP override-testikentät (ei tarpeen enää) - Tallennus pitää lomakkeen auki + näyttää "Tallennettu" -ilmoituksen - SMTP-kenttäjärjestys samaksi kuin IMAP: Palvelin → Portti → Tunnus → Salasana → Salaus Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
8
api.php
8
api.php
@@ -2996,19 +2996,12 @@ switch ($action) {
|
||||
'smtp_encryption' => $mailbox['smtp_encryption'] ?? '',
|
||||
'smtp_from_email' => $mailbox['smtp_from_email'] ?? '',
|
||||
];
|
||||
// Override: käyttäjä voi antaa tunnukset suoraan testiin (ohittaa DB:n)
|
||||
$overrideUser = trim($input['override_user'] ?? '');
|
||||
$overridePass = $input['override_pass'] ?? '';
|
||||
// Laske fallback-arvot
|
||||
$effectiveUser = $mailbox['smtp_user'] ?? '';
|
||||
if ($effectiveUser === '') $effectiveUser = $mailbox['imap_user'] ?? '';
|
||||
if ($effectiveUser === '') $effectiveUser = $mailbox['smtp_from_email'] ?? '';
|
||||
$effectivePass = $mailbox['smtp_password'] ?? '';
|
||||
if ($effectivePass === '') $effectivePass = $mailbox['imap_password'] ?? '';
|
||||
// Jos override annettu, käytä sitä
|
||||
$usingOverride = false;
|
||||
if ($overrideUser !== '') { $effectiveUser = $overrideUser; $usingOverride = true; }
|
||||
if ($overridePass !== '') { $effectivePass = $overridePass; $usingOverride = true; }
|
||||
$host = $mailbox['smtp_host'] ?? '';
|
||||
$port = (int)($mailbox['smtp_port'] ?? 587);
|
||||
$encryption = $mailbox['smtp_encryption'] ?? 'tls';
|
||||
@@ -3022,7 +3015,6 @@ switch ($action) {
|
||||
'effective_user' => $effectiveUser,
|
||||
'effective_pass_hint' => $passHint,
|
||||
'effective_pass_len' => strlen($effectivePass),
|
||||
'using_override' => $usingOverride,
|
||||
'steps' => [],
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user