From 1763e0341d03b3ad3ab1ebd04bebaffe6f7954db Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Wed, 21 Jun 2023 10:53:24 +0200 Subject: [PATCH] fix --- app/Http/Livewire/Settings/Email.php | 4 +- .../TransactionalEmails/TestEmail.php | 3 +- resources/views/emails/test.blade.php | 2 - .../notifications/email-settings.blade.php | 18 ++++---- .../views/livewire/settings/email.blade.php | 46 +++++++++---------- 5 files changed, 33 insertions(+), 40 deletions(-) diff --git a/app/Http/Livewire/Settings/Email.php b/app/Http/Livewire/Settings/Email.php index dd6a31fa7..b82982a6a 100644 --- a/app/Http/Livewire/Settings/Email.php +++ b/app/Http/Livewire/Settings/Email.php @@ -47,9 +47,9 @@ public function instantSave() $this->validate(); } } - public function test_email() + public function testNotification() { - Notification::send($this->settings, new TestEmail); + $this->settings->notify(new TestEmail); $this->emit('success', 'Test email sent.'); } private function decrypt() diff --git a/app/Notifications/TransactionalEmails/TestEmail.php b/app/Notifications/TransactionalEmails/TestEmail.php index 19e45dfc2..4dbd7f1c3 100644 --- a/app/Notifications/TransactionalEmails/TestEmail.php +++ b/app/Notifications/TransactionalEmails/TestEmail.php @@ -3,7 +3,6 @@ namespace App\Notifications\TransactionalEmails; use App\Notifications\Channels\EmailChannel; -use App\Notifications\Channels\TransactionalEmailChannel; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Notifications\Messages\MailMessage; @@ -19,7 +18,7 @@ public function via(): array public function toMail(): MailMessage { $mail = new MailMessage(); - $mail->subject('Coolify Test Notification'); + $mail->subject('Test Notification'); $mail->view('emails.test'); return $mail; } diff --git a/resources/views/emails/test.blade.php b/resources/views/emails/test.blade.php index c06e333f0..63b0b45cc 100644 --- a/resources/views/emails/test.blade.php +++ b/resources/views/emails/test.blade.php @@ -1,3 +1 @@ -Hello,

- If you are seeing this, it means that your SMTP settings are correct. diff --git a/resources/views/livewire/notifications/email-settings.blade.php b/resources/views/livewire/notifications/email-settings.blade.php index 406c7ce6b..f0e4d1ed5 100644 --- a/resources/views/livewire/notifications/email-settings.blade.php +++ b/resources/views/livewire/notifications/email-settings.blade.php @@ -35,17 +35,15 @@ -
-
- - -
+
+ + -
- - -
+
+
+ +
@if (data_get($model, 'smtp.enabled')) diff --git a/resources/views/livewire/settings/email.blade.php b/resources/views/livewire/settings/email.blade.php index c8a9bbbcc..d1cb2bdb0 100644 --- a/resources/views/livewire/settings/email.blade.php +++ b/resources/views/livewire/settings/email.blade.php @@ -5,6 +5,11 @@ Save + @if ($settings->smtp->enabled) + + Send Test Email + + @endif
SMTP settings for password resets, invitations, etc.
@@ -13,31 +18,24 @@
- @if ($settings->smtp->enabled) - - Send Test Email - - @endif +
-
-
- - - -
-
- - - -
-
- - -
+
+ + + +
+
+ + + +
+
+ +