Test postmark connection before storing credentials into the app

This commit is contained in:
Čarodej
2022-04-08 09:44:58 +02:00
parent 86090d5192
commit 9a15f2ecd8
10 changed files with 138 additions and 27 deletions

View File

@@ -30,10 +30,11 @@ class TestSMTPConnectionAction
],
]]);
// Get sender
$sender = $credentials['email'] ?? $credentials['username'];
// Send test email
Mail::to('test@hi5ve.digital')->send(new TestMail($sender));
Mail::to($sender)->send(new TestMail($sender));
} catch (TransportException | LogicException $error) {
abort(
response()->json([