From bad5409d9c5354c42c5eaec4378f5a6d0f779635 Mon Sep 17 00:00:00 2001 From: notCharles Date: Sat, 10 Aug 2024 19:39:41 -0400 Subject: [PATCH] Fix saving SMTP without encryption --- app/Filament/Pages/Settings.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/app/Filament/Pages/Settings.php b/app/Filament/Pages/Settings.php index 4cfe7ce10..aec3819c4 100644 --- a/app/Filament/Pages/Settings.php +++ b/app/Filament/Pages/Settings.php @@ -262,28 +262,27 @@ class Settings extends Page implements HasForms ->visible(fn (Get $get) => $get('MAIL_MAILER') === 'smtp') ->schema([ TextInput::make('MAIL_HOST') - ->label('SMTP Host') + ->label('Host') ->required() ->default(env('MAIL_HOST', config('mail.mailers.smtp.host'))), TextInput::make('MAIL_PORT') - ->label('SMTP Port') + ->label('Port') ->required() ->numeric() ->minValue(1) ->maxValue(65535) ->default(env('MAIL_PORT', config('mail.mailers.smtp.port'))), TextInput::make('MAIL_USERNAME') - ->label('SMTP Username') + ->label('Username') ->required() ->default(env('MAIL_USERNAME', config('mail.mailers.smtp.username'))), TextInput::make('MAIL_PASSWORD') - ->label('SMTP Password') + ->label('Password') ->password() ->revealable() ->default(env('MAIL_PASSWORD')), ToggleButtons::make('MAIL_ENCRYPTION') - ->label('SMTP encryption') - ->required() + ->label('Encryption') ->inline() ->options(['tls' => 'TLS', 'ssl' => 'SSL', '' => 'None']) ->default(env('MAIL_ENCRYPTION', config('mail.mailers.smtp.encryption', 'tls'))), @@ -293,15 +292,15 @@ class Settings extends Page implements HasForms ->visible(fn (Get $get) => $get('MAIL_MAILER') === 'mailgun') ->schema([ TextInput::make('MAILGUN_DOMAIN') - ->label('Mailgun Domain') + ->label('Domain') ->required() ->default(env('MAILGUN_DOMAIN', config('services.mailgun.domain'))), TextInput::make('MAILGUN_SECRET') - ->label('Mailgun Secret') + ->label('Secret') ->required() ->default(env('MAIL_USERNAME', config('services.mailgun.secret'))), TextInput::make('MAILGUN_ENDPOINT') - ->label('Mailgun Endpoint') + ->label('Endpoint') ->required() ->default(env('MAILGUN_ENDPOINT', config('services.mailgun.endpoint'))), ]),