mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
smtp: probe credentials on save (connect+auth+quit, no message sent)
This commit is contained in:
@@ -47,7 +47,14 @@ if ($section === 'formulaire') {
|
||||
$smtpData['password'] = $pwd;
|
||||
}
|
||||
SmtpRelay::updateSettings($db, $smtpData);
|
||||
App::flash('success', "Paramètres SMTP mis à jour.");
|
||||
|
||||
// Immediately probe the server to validate credentials
|
||||
$test = SmtpRelay::test($db);
|
||||
if ($test['ok']) {
|
||||
App::flash('success', "Paramètres SMTP mis à jour — connexion validée avec succès ✓");
|
||||
} else {
|
||||
App::flash('error', "Paramètres sauvegardés, mais le test de connexion SMTP a échoué : " . $test['error']);
|
||||
}
|
||||
} else {
|
||||
App::flash('error', "Section inconnue.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user